How to Use PuTTY (SSH Terminal)
access_time
hourglass_empty
person_outline

How to Use PuTTY (SSH Terminal)

SSH, or Secure Shell, is a secure protocol for connecting to a remote server. To establish an SSH connection, you will need an SSH client app like PuTTY.

In this guide, you will learn how to use PuTTY SSH terminal to connect to your hosting account or to a VPS server. That way, you can access and manage your remote machine by executing various commands.

Save up to 77% today and check out Hostinger’s VPS Plans!

Click here

How to Download PuTTY

PuTTY is most commonly used on Windows, however, it is also available on Linux and Mac. Here is how you can get the putty download on different operating systems.

Windows

Download the latest version of PuTTY SSH from the official website. After that, install it on your computer. It’s as simple as that.

Download putty from putty website

Linux

Most people use the preinstalled OpenSSH on Linux, however, PuTTY on Linux is used more for debugging, connecting to serial ports, and to raw sockets.

On Debian, use the following command:

sudo aptitude install putty

Followed by the tools installation command:

sudo aptitude install putty-tools

MacOS

Like Linux, the macOS comes with a command-line SSH client already installed. But to download PuTTY, open the terminal window and use the commands below.

To install PuTTY for mac:

brew install putty (or) port install putty

Requirements For Set Up

Next, you will need a bit of information before you can begin using PuTTY. You will need:

  • Server IP Address
  • SSH port
  • SSH username
  • SSH password

If you are Hostinger user, there are two ways to find this information, depending on your hosting plan:

    • Shared hosting — go to the SSH Access menu under the Advanced category. Here you will see all the login details that you need. If you forgot your password, easily reset it via the FTP Accounts menu.
      The SSH Access section of hPanel under advanced settings
    • VPS — the credentials are located in the Server tab of hPanel, under SSH Details. In case you don’t know what your password is, scroll down to the Root Password section, and create a new one.
      server section showing the ssh details for username and port

How to Connect PuTTY

  1. Launch the PuTTY SSH client, then enter your server’s SSH IP and SSH Port. Click the Open button to proceed.
    The main menu of PuTTY SSH client
  2. A login as: message will pop-up and asks you to enter your SSH username. For VPS users, this is usually root. However, for shared hosting users, you will need to enter a predefined username like u721233450. After entering your username, press Enter.
  3. Type your SSH password and press Enter again. For security reasons, the screen won’t show the password but will register what you type.
    Connecting to your server via PuTTY

Congratulations! You have successfully connected to your account using the PuTTY SSH client. You can list all available SSH commands by executing help via the terminal.

How to Use PuTTYgen

PuTTYgen is a tool that creates public and private key pairs. PuTTY stores these key authentications in its .ppk format files. With Windows, you will use the PuTTYgen.exe graphical tool, while with Linux you will use the command line.

To begin, locate PuTTY and open PuTTYgen.

To create a new key pair, click the Generate button near the bottom and begin to move your mouse around within the window. Continue moving your mouse until the green progress bar is full.

puttygen key generator progress bar

After it is complete, your public key will appear in the window.PuttyGen public and private key

It is recommended to use a passphrase as well as saving your private key.

Install Public Key on Server

To grant access to an account, you will need to add the new public key to the file named ~/.ssh/authorized_keys.

First, install the public key. Then, log into your server and locate the authorized_keys file. Edit the file and insert the new public key into the file. Save the file and test to see if the login works.

Conclusion

We hope this article helps you to use the PuTTY client to connect to your hosting account. If you want to learn more about SSH, we have several articles that can help you out:

Feel free to comment if you have any questions.

The Author

Author

Linas L. / @linas

Linas started as a customer success agent and is now a full-stack PHP developer at Hostinger. He is passionate about making a positive impact on people by utilizing user-driven development techniques. As much as he enjoys coding and changing the world, he secretly dreams of becoming a rock star.

Related tutorials

Author

Yasta Reply

July 12 2020

I don't have access to SSH as you mentioned under advanced section, is there any special permissions needed for accessing files via putty? for some reason I was unable to compress files under file manager section whatever I do its cutting me off and throwing me errors. How can I access file manager via SSH ?

    Author

    Tomislav T.

    Replied on July 15 2020

    Hey there Yasta :) All of our plans except Single Shared Hosting have SSH access. I am not sure which one are you using, so the process may be a bit different on VPS vs Shared/Cloud Hosting, but in general you need to first enable the SSH access which you can find on your dashboard. Once you enable it - you will be able to connect via SSH :)

Author

Michael Reply

August 31 2020

I need to Create dnsrecords A via SSH terminal using PuTTY, how can I get that done?

    Author

    Tomislav T.

    Replied on November 11 2020

    Hey Michael. I am not sure which platform are you using (which OS, which control panel, what kind of server are you using, if its Shared, VPS etc), but here is an example guide from plesk's support page, about Plesk in this case. You can check something similar depending on the OS/Control Panel that you are using! :)

Author

Jayant Singh rawat Reply

September 16 2020

Hi, I have accessed the ssh, somehow. But now I am getting "there were 7 failed login attempts since the last successful login" error. I got this error when I use Command Prompt to connect SSH. But when I am using putty. It closed the window. Please help me with this

    Author

    Tomislav T.

    Replied on November 11 2020

    Hey there Jayant. It's hard to check this over a comment section, but please don't hesitate to message our Customer Success team, which will gladly guide you through the process.

Leave a reply

Comment*

Name*

Email*

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Become a part of Hostinger now!

More in VPS
How to See System Users In Ubuntu Linux VPS
How to List Users on Ubuntu Linux VPS

Close