Connecting to a Remote Server Over SSH using PuTTY
Traducciones al EspañolEstamos traduciendo nuestros guías y tutoriales al Español. Es posible que usted esté viendo una traducción generada automáticamente. Estamos trabajando con traductores profesionales para verificar las traducciones de nuestro sitio web. Este proyecto es un trabajo en curso.
A secure shell (SSH) is used for secure communication between devices. When most people refer to SSH, it is within the context of a connecting from a local computer to a remote server, commonly for administration tasks related to website hosting.
This article covers the basics of connecting to a remote server (such as a Linode) over SSH using the PuTTY application. PuTTY is a free and open source SSH client that provides a graphic interface for connecting to remote servers. It is compatible with Windows XP and later systems, including Windows Vista, 7, 8 and 10. It is also compatible with most UNIX systems.
NoteWhile PuTTY is compatible with Windows 10, you may want to review the Connecting to a Remote Server Over SSH on Windows guide for alternatives to PuTTY that may better suit your needs and preferences.
Before You Begin
Ensure you have a Linux server with an SSH server (like OpenSSH) installed. Most Linux distributions have an SSH server preinstalled. If you wish to deploy a new server, follow the Getting Started guide to create a Linode.
Install PuTTY on your local Windows or Linux system.
Connecting to the Remote Server Over SSH
Open PuTTY. You can find PuTTY on your desktop, through the Start Menu, or by using Windows Search.
Enter the following basic details about the destination host and the connection type.
- Host Name: The domain name or IP address of the destination host.
- Port: The SSH port on the destination host. The default port for most servers is 22, though you can change this port if needed.
- Connection type: Select SSH for the connection type, though you can modify this if using a different protocol.
Optionally, save your session to quickly reconnect in the future. Type in a unique name for the connection under Saved Sessions and press the Save button.
Click the Open button at the bottom of the PuTTY window to open the connection.
When you connect to a server for the first time, PuTTY prompts you to verify that the host key’s fingerprint matches what you expect.
If you trust this connection, press the Accept button to continue connecting to the remote server. You can verify the fingerprint by following the instructions under the Verifying the Host Key’s Fingerprint section.
PuTTY now prompts you to enter the remote user and the password for that user.
Once you have successfully connected, your terminal should be using the remote shell environment for the server. Your command prompt should now show the username and hostname configured for the server. You can now run any commands that you have available on that server. This includes many of the basic Linux commands, such as
rm, and those covered in
Using the Terminal guide. Getting to know these commands will help you navigate around your server.
Verifying the Host Key’s Fingerprint
Log in to your remote server through a trusted method. For a Linode, use Lish.
Run the command below to output your server’s SSH key fingerprint
ssh-keygen -E md5 -lf /etc/ssh/ssh_host_ed25519_key.pub
The output looks similar to:
256 MD5:58:72:65:6d:3a:39:44:26:25:59:0e:bc:eb:b4:aa:f7 [email protected] (ED25519)
NoteFor the fingerprint of an RSA key instead of elliptical curve, use:
ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub.
Compare this output to what appears when opening an SSH connection on your local computer. The two fingerprints should match. If the fingerprints do not match, do not connect to the server. You won’t receive further warnings unless the fingerprint changes for some reason. Typically, this should only happen if you reinstall the remote server’s operating system. If you receive this warning again from a system you already have the host key cached on, you should not trust the connection and investigate matters further.
Troubleshooting SSH Connection Issues
If SSH isn’t connecting you to your Linode, you may need to investigate the state of your server. See the guide Troubleshooting SSH for assistance.
Now that you can connect from your Linux machine to the Linode over SSH, save not only time but also make the connection even more secure by using SSH public key authentication. See the guide Use SSH Public Key Authentication on Linux, macOS, and Windows for details.
Additional PuTTY Guides
- Create an SSH Tunnel for MySQL Remote Access: This guide uses PuTTY to create a secure SSH tunnel to access the MySQL command prompt on remote server.
This page was originally published on