PuTTY is a free, open-source linux terminal emulator, serial console and network file transfer application. It is available for UNIX and Windows-based operating systems. Apart from other functions, PuTTY can be used to connect from a remote computer to a Raspberry Pi accessing its terminal interface.
PuTTY can use SSH (secure shell or secure socket shell) to log into Linux operating systems using their usernames and passwords. Raspbian, OpenELEC and RetroPi are among the systems that can be connected to. On Windows operating systems, the interface of the connection is via a windowed, terminal-like CLI.
Raspberry Pis are popular to use as small, standalone devices on a network. By using PuTTY, the need for these devices to have a keyboard, mouse and screen is reduced to only their setup phases. After an IP address has been obtained, PuTTY can be used from a remote computer to have full access via a terminal.
Requirements & assumptions
- Both the Raspberry Pi and the remote computer needs to be connected on the same local network.
- The Raspberry Pi to be connected to has SSH enabled. Some Raspbian distributions has SSH enabled by default, but can be configured using the Raspi-config tool.
- The IP address of the Raspberry Pi is available. The following command can be used in the terminal to obtain the latest IP address:
Using an Ethernet cable will need no configuration and will allow network connection with an automatic assigned dynamic IP address. Using Wi-Fi will also assign a dynamic IP, but will need the network name (SSID) and the password (also called the passphrase or pre-shared key) of the wireless network. Also read 3 ways to connect a Raspberry Pi 3 to a network using Wi-Fi.
Although a static IP address for the Raspberry Pi is not required, it is recommended. A static IP will standarise the address used to access the Raspberry Pi. Read more about setting up a static IP.
Downloading & configuring PuTTY
PuTTY can be downloaded here. The first time PuTTY is opened there will be no Saved Sessions. Under Host Name, enter the IP address of the Raspberry Pi, leave the port to 22 , make sure SSH is selected and give it a name under Saved Sessions and Save. Multiple Saved Sessions to different devices can be created.
By double clicking on the Saved Session name, the Raspberry Pi’s terminal will open. After the first time the security key will be created upon acceptance. For Raspbian, the default username and password is pi and raspberry.
The settings can be changed by selecting the applicable Saved Session and Load. After changing the settings it needs to be saved again.
Using PuTTY with OpenELEC & XBMC (Kodi)
There might be times when CLI access to Kodi is required.
Kodi might not have SSH enabled. SSH can be enabled from the Services section by going to Settings -> OpenELEC -> Settings (do not change the username and password settings for now). A reboot might be required.
The default username and password for OpenELEC is root and openelec and root without a password for XBMC.
Using PuTTY with RetroPie
To use PuTTY to connect to RetroPie, SSH needs to be enabled from the RetroPie Configuration screen by choosing RASPI-CONFIG-> 5 Interfacing Options -> P2 SSH.
The default username and password for RetroPie is pi and raspberry.