members
Raspberry basics: Project 26a Raspberry PI Zero W board - Enable SSH
of Acoptex.com in Raspberry Pi Zero W
Raspberry basics: Project 26a
Project name: Raspberry PI Zero W board - Enable SSH
Tags: Raspberry, Raspberry PI Zero W board, vers 1.1, v 1.1, SSH, how to enable SSH
Attachments:
In this project, you needed these parts (Dear visitors. You can support our project buy clicking on the links of parts and buying them or donate us to keep this website alive. Thank you):
1. Raspberry PI Zero W board or full kit 1 pc
2. Micro SD card with NOOBS and SD card adapter 1 pc
3. Micro USB power supply (2 A 5V or 5V 3A) 1 pc
4. USB keyboard 1 pc
5. USB mouse 1 pc
6. TV or PC monitor 1 pc
7. HDMI cable 1 pc
8. T-Cobbler Breakout and GPIO Cable 1 pc
9. Micro USB 2.0 OTG Cable 1 pc
10. Mini HDMI to HDMI Adapter (HDMI to Mini HDMI Adapter) 1 pc
11. 4-Port USB 2.0 Hub 1 pc
General
We will learn how to enable SSH on Raspberry Pi for remote access.
You can access the command line of a Raspberry Pi remotely from another PC or device on the same network using SSH.
The Raspberry Pi will act as a remote device: you can connect to it using a client on another machine.
You only have access to the command line, not the full desktop environment.
When enabling SSH on a Raspberry Pi that may be connected to the internet, you should change its default password to ensure that it remains secure.
Understanding the Raspberry PI Zero W board
You can read more about it here.
Signals and connections of the Raspberry PI Zero W board
Step by Step instruction
We recommend using a high-performance SD card for increased stability as well as plugging your device into an external display to see the default application booting up.
1. Setup and preparation
We assume that you have Windows 10 installed on your PC and Raspbian OS installed on your Raspberry Pi Zero W board.
- Do wiring.
- Insert your micro SD card with Raspbian OS into the TF card slot on the Raspberry Pi Zero W board. It will only fit one way.
- Connect Raspberry PI Zero W board mini HDMI port to your TV or Monitor HDMI (DVI) port (use HDMI cable and mini HDMI to HDMI adapter and/or HDMI to DVI adapter).
- Make sure that your monitor or TV is turned on, and that you have selected the right input (e.g. HDMI/DVI, etc).
- Plug in micro USB 2.0 OTG Cable to USB data port of Pi Zero and 4-Port USB 2.0 Hub to micro USB 2.0 OTG Cable.
- Plug in your USB mouse and USB keyboard to 4-Port USB 2.0 Hub.
- If you intend to connect your Raspberry Pi Zero vers 1.2 or vers 1.3 to the internet, connect a WiFi dongle to one of the 4-Port USB 2.0 Hub ports.
- Connect Micro USB power supply to Raspberry PI Zero board micro USB input.
- The Raspberry PI desktop will start up.
- Open Terminal window and type the command: sudo apt-get update
- Then type the command: sudo apt-get upgrade -y
- Adding -y to the end of apt-get commands instructs the program to automatically answer yes to any questions rather than waiting for you to type Y or N.
2. Enable SSH from Raspberry Pi desktop
- As of the November 2016 release, Raspbian has the SSH server disabled by default. Open the Raspberry Pi Configuration tool from the main menu. Go to Raspberry icon-> Preferences -> Raspberry PI configuration
- Select Interfaces and make sure that SSH and other settings are enabled so you will not need to come back to these configuration tool again.
- Click on OK button.
- We need to reboot our Raspberry PI. If it will not reboot automatically go to Terminal. Type this command in the Terminal: sudo reboot
3. Using Terminal - modifying the raspi-config
- Go to the Terminal. Type the command: sudo raspi-config
- Select Interfacing Options and press Enter button.
- Select SSH and press Enter button.
- Select Yes and press Enter button.
- Press Enter button.
- Select Finish and press Enter button.
- We need to reboot our Raspberry PI. Type this command in the Terminal: sudo reboot
4. Using Terminal - systemctl to start the service
- Go to the Terminal. Type this commands: sudo systemctl enable ssh
- sudo systemctl start ssh
5. Enable SSH on a headless Raspberry Pi (add file to SD card on another machine)
- For headless setup, SSH can be enabled by placing a file named ssh, without any extension, onto the boot partition of the SD card from another computer. When the Raspberry Pi boots, it looks for the ssh file. If it is found, SSH is enabled and the file is deleted. The content of the file does not matter; it could contain text, or nothing at all.
- If you have loaded Raspbian OS onto a blank SD card, you will have two partitions. The first one, which is the smaller one, is the boot partition. Place the file into this one.
Summary
We have learnt how to enable SSH on Raspberry Pi for remote access.
Libraries in use
- None
Script
- None
Other projects of Acoptex.com










Viewed: 1851 times