Using PuTTY to connect to a Raspberry Pi

Using PuTTY to connect to a Raspberry Pi
Published: by
Last updated:
KodiRaspberry Pi

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.

PuTTY SSH terminal window
PuTTY terminal window from Windows 10. The window/connection can be closed by using the ‘exit’ command.

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.

PuTTY used together with WinSCP will extend access to a user friendly file copy interface. WinSCP uses SCP and functions as a visual representation of the directory and file structures.

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:
    hostname -I

    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.

Using PuTTY to Connect to a Raspberry Pi

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.

Kodi Services Settings
SSH can be enabled in the Kodi Services Settings section.

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.

Introducing RetroPie - the Raspberry Pi classic video game emulator

The default username and password for RetroPie is pi and raspberry.

About the author
Renier busies himself with improving his English writing, creative web design and his websites, photoshopping, micro-electronics, multiple genres of music, superhero movies and badass series.
Behind the Scenes is a free, informative website. If you find value in any of our content, please consider making a donation to our cause.
Donate via PayPal

Save, share & Disqus

Use the buttons below, on the left or the bottom of this page to share this post. Your comment is important, but don't be a knob. Keep it constructive and polite.

Comment via Disqus

Disqus is a worldwide comment hosting service for web sites and online communities. This secure platform ensures a pleasant commenting environment which is manageable from one account. Use the Login button to sign up.

More home network related posts

Communicating between 2 Raspberry Pi's using sshpass
Communicating between 2 Raspberry Pis using sshpass
10 September 2016 | Updated 24 October 2018
sshpass is a Linux software package that can be used to establish a direct (secure) connection between two Linux operated computers. This connection allows ‘remote’ access to a ‘local’ computer to run commands ‘locally’. Communicating between 2 Raspberry Pi’s using sshpass will show you how. More…
Raspberry Pi
Understanding common network protocols
Understanding some common network protocols
7 September 2016 | Updated 17 November 2017
Deeper exploration into the world of inter-computer communications will reveal more and more types of communications (e.g. radio waves, Ethernet, Bluetooth, etc.), their interfaces and the network protocols they use. More…