Linux Rack Server

Linux Server | eBay

This article provides steps for connecting to a cloud server from a computer running Linux or Mac OS X by using SSH. It also discusses generating an SSH key and adding a public key to the server.


Secure Shell (SSH) is a protocol through which you can access your cloud server and run shell commands. You can use SSH keys to identify trusted computers without the need for passwords, and to interact with your servers.

SSH is encrypted with SSL, which makes it difficult for these communications to be intercepted and read.

Note: Many of the commands in this article must be run on your local computer. The default commands listed are for the Linux command line or Mac OS X Terminal. To make SSH connections from Windows, you can use a free program called PuTTY. To generate keys, you can use a related program, PuTTYGen.

Log in

Using the IP address and password for your cloud server, log in by running the ssh command with

You are prompted to enter the password for the account to which you’re connecting.

Remote host identification

If you rebuilt your cloud server, you might get the following message:


One of the security features of SSH is that when you log in to a cloud server, the remote host has its own key that identifies it. When you try to connect, your SSH client checks the server’s key against any keys that it has saved from previous connections to that IP address. When you rebuild a cloud server, that remote host key changes, so your computer warns you of possibly suspicious activity.

On your local computer, edit the SSH known_hosts file and remove any lines that start with your cloud server’s IP address.

nano ~/.ssh/known_hosts

If you are not using Linux or Mac OS X on your local computer, the location of the known_hosts file might differ. Refer to your OS for information about the file location. PuTTY on Windows gives you the option of replacing the saved host key.

Generate a new SSH key pair

You can secure SSH access to your cloud server against brute force password attacks by using a public-private key pair. A public key is placed on the server and a matching private key is placed on your local computer. If you configure SSH on your server to accept only connections using keys, then no one else can log in by using just a password. Connecting clients are required to use a private key that has a public key registered on the server.

Related posts: