SSH (Secure Shell) allows you to remotely access your Raspberry Pi's command line over a network.
π 1. Enable SSH on Raspberry Pi
If SSH isnβt enabled:
- Run the Raspberry Pi configuration tool:
`bash
sudo raspi-config`
Navigate to:
Interfacing Options β SSH β EnableConfirm and exit.
Reboot the Raspberry Pi if necessary:
`bash
sudo reboot`
πΉ Alternative Method: Place an empty file named ssh (no extension) in the boot partition of your SD card. SSH will be enabled on boot.
π 2. Find the Raspberry Pi's IP Address
On your Raspberry Pi, run:
`bash
hostname -I`
Take note of the IP address (e.g., 192.168.1.100).
π 3. SSH from Another Device
On your computer (Linux, macOS, or Windows with an SSH client like PowerShell or Command Prompt), run:
`bash
ssh pi@`
- Replace with your Raspberry Pi's IP address.
- Default username: pi
- Default password: raspberry (if unchanged).
π 4. Accept SSH Fingerprint
The first time you connect, you'll see:
`bash
Are you sure you want to continue connecting (yes/no)?`
Type:
`bash
yes`
Enter your password when prompted.
π 5. SSH Using a Custom Port (if changed)
If SSH is running on a non-default port (e.g., 2222):
`bash
ssh -p 2222 pi@`
π 6. Exit SSH Session
When you're done, exit the session with:
`bash
exit`
β Youβre now connected to your Raspberry Pi via SSH! π
Top comments (0)