how to connect to linux vps Print

  • linux, vps, centos, ubuntu, debian
  • 99

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.

Where can i 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.

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:

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

How to Connect PuTTY

Launch the PuTTY SSH client, then enter your server’s SSH IP and SSH Port. Click the Open button to proceed.

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 root. After entering your username, press Enter.

Type your SSH password and press Enter again. For security reasons, the screen won’t show the password but will register what you type.

 

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.

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

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.

 




Was this answer helpful?

« Back