With PuTTY, you can simply enter (and save) the IP Address of the pi, username and password (will get onto this in a moment) and click open.
To begin, you first need to enable SSH on the Pi itself. Unfortunately, this does require you to have a keyboard (+ mouse if you are not running a headless version of Raspbian) plugged into the Pi for the time being.
To enable SSH, we must use the raspi-config menu:
- Boot up the Pi
- Type “sudo raspi-config” at the terminal
- Navigate to “Advanced Options”
- Select “Enable SSH”
- Restart the Pi by selecting Finish
Important Note: If this is the first time you have booted up the Pi, before you restart the Pi (step 5), you must enable the device to auto log-on. Without this option enabled, your Pi will wait in a state where it is prompting you to enter the username and password for the user you want to log into. While the Pi is in this state, you will not be able to SSH into the Pi! See “Enable Boot to desktop” in the raspi-config manual
Connecting To the Raspberry Pi Via SSH
Now that SSH is enabled on our Pi, we can remove our keyboard and mouse which was previously connected to it and ensure the Pi is plugged into the same network as our main computer.
Unless you have changed them, the default settings for the Pi are as follows:
- Username: “pi”
- Password: “raspberry”
Opening the Connection [Mac & Linux]
Open up the terminal and enter the following command:
> ssh email@example.com
A prompt will appear to enter the password of the user you wish to log in as. In this example, the user “Pi” is chosen.
Of course, don’t forget to change the IP address to match the address of your Pi.
Opening the Connection [Windows]
Simply open PuTTY, enter the IP address of the Pi, along with the username and password of the user you want to log in as (see default settings if you have not made any changes to the Pis user account) and click open.
Getting the IP Address of the Pi
In a future post I will describe how to set up a fixed IP address for your Pi. For now, your Pi will need to be plugged into a monitor. When you boot up your Pi, you should be able to see the following.
For those interested in understanding how SSH works and additional security measures to take, read Understanding SSH Keys