Control a Raspberry Pi Remotely

If you don't have a monitor, keyboard, and mouse connected to the device, you can still control the device remotely via SSH.

Ethernet/Wi-Fi option

  1. Enable SSH on a headless Raspberry Pi (see section "Enable SSH on a Headless Raspberry Pi").
  2. Plug in an ethernet cable.
  3. Power on the Raspberry Pi.
  4. Find the Raspberry Pi IP address.
  5. If you prefer to use ethernet, skip to the next section.
  6. If you prefer to use Wi-Fi, first connect via USB-TTL. Then:

USB-TTL option

  1. Get console access using a USB-TTL cable.
  2. Plug in an ethernet cable or connect to a Wi-Fi network using the command line.

Connect to the Raspberry Pi via SSH

To run commands on the Raspberry Pi, you need to open the terminal on the device or use an SSH connection. You must use an SSH connection from your development machine if you do not have a monitor, keyboard, and mouse connected to the Raspberry Pi.

Make sure SSH is enabled on the Raspberry Pi.

ssh pi@raspberry-pi-ip-address
password: password-for-raspberry-pi

For example:

$ ssh pi@192.168.1.101
password: raspberry

On Raspbian, the default password for the pi user is raspberry. You should change this password immediately (run passwd in a terminal on the Pi).

Use the terminal or the SSH session you set up in this step to enter the commands in the rest of this guide. The working directory for both is /home/pi.