Sometimes you need to access a Raspberry Pi without connecting it to a monitor, keyboard, and mouse. Perhaps the Raspberry Pi is embedded in a robot or mounted in an inconvenient location. Or maybe you don’t have a spare monitor.
To remotely control your Raspberry Pi from another device on your local network, use one of the following services:
SSH (Secure SHell)- provides secure access to a terminal session on your Raspberry Pi.
Alternatively, create an empty file named ssh (no extension) in the /boot directory of your Pi’s SD card
sudo raspi-config
Then, navigate to Interfacing Options > SSH > Enable
Hint
If you have an OS other than Raspbian (e.g. Ubuntu), you may need to first install the utility by running
sudo apt install raspi-config
Connect to an SSH Server
Hint
Ubuntu does not have SSH server enabled out of the box, but can be installed by running sudo apt install openssh-server
Open a terminal on your host machine (Linux/macOS) or use an SSH client (e.g., PuTTY for Windows)
Use the SSH command to connect to your Raspberry Pi. Replace <user> with your username (default is pi), and <ip-address> with the Raspberry Pi’s IP address:
ssh <user>@<ip-address>
Example:
ssh pi@192.168.68.121
Enter the password for the Raspberry Pi when prompted
Once authenticated, you will be logged into the Raspberry Pi’s terminal remotely