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 used to connect to a remote device with one of its many connection types.

This is an ongoing post. Please suggest corrections, explanations, etc. in the comment section at the bottom of this page.

Apart from various other functions, PuTTY can be used to establish a command-line interface (CLI) between a personal computer and a remote Raspberry Pi. This post points out how to download, install and configure PuTTY, and how to connect to Raspbian, OpenELEC, XBMC and RetroPie. PuTTY’s SSH connectivity will be used.

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

PuTTY can use SSH (secure shell or secure socket shell) to log in to Linux operating systems using their usernames and passwords. Raspbian, OpenELEC and RetroPi are among the systems that can be connected to.

Why use PuTTY to connect to a Raspberry Pi

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 for using PuTTY

  • Both the Raspberry Pi and the remote computer needs to be connected on the same local network.
  • The Raspberry Pi needs to have 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 needs to be known. A quick way to get the IP address of the Raspberry Pi is by using the following terminal command:
hostname -I
  • (Optional) Although a static IP address for the Raspberry Pi is not required, it is recommended. A static IP will standardise the address used to access the Raspberry Pi.

Downloading, installing & configuring PuTTY

Putty is available for download and installation on Windows and UNIX-based operating systems. The PuTTY installation file can be downloaded from here. For Microsoft Windows users, simply run the downloaded file by double-clicking on it and follow the on-screen instructions.

The first time PuTTY is opened there will be no Saved Sessions. A saved session is basically a name given to a group of settings (including the IP address, connection type and close window on exit method for the remote Raspberry Pi).

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, then click the Save button. Multiple Saved Sessions to different Raspberry Pis can be created.

Using PuTTY to Connect to a Raspberry Pi

In this case, Kim, Mockingbird, Panda, etc. are all saved sessions to different Raspberry Pis.

By double-clicking on the Saved Session name, the Raspberry Pi’s terminal will open. During the first connection, PuTTY will obtain the host key from the Raspberry Pi, which will probably cause security-alert to popup.

PuTTY security alert

Click Yes to continue with the connection.

For Raspbian, the default username and password is pi and raspberry.

The settings can be changed by selecting the applicable Saved Session and pressing the Load button. After changing the settings it needs to be saved again.

Although PuTTY is mainly a Telnet and SSH client, other connection types include Raw, Rlogin and serial can also be used to connect to other devices.

PuTTY alternatives

PuTTY makes is easy to establish a non-intimidating, CLI between a personal computer and a Raspberry Pi. As mentioned earlier, its main connection method is SSH. An alternative for using PuTTY is using the Windows Command Prompt (searchable from the Windows search icon).

To use the Windows Command Prompt to connect to a Raspberry Pi, the SSH command can be used as follows:


where <USERNAME> is the username and <IP ADDRESS> is the IP address of the remote Raspberry Pi, e.g.:

ssh pi@192.168.1.xx

After the command was entered, the SSH command will ask for the password of the Raspberry Pi. The default password for Raspbian is raspberry.

Using PuTTY to connect to OpenELEC & XBMC (Kodi)

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 to connect to RetroPie

To use PuTTY to connect to RetroPie, SSH needs to be enabled from the  RetroPie Configuration screen. This is done 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 29 February 2020
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…