How to enable SSH for Cloud VPS on Mac OS

First you need to generate SSH key pair for your connection. Under Mac OS you can do so using the ssh-keygen command. You should run it in the command line. You will be asked for a file where the key should be saved to and for a passphrase (password) for the key. Here is an example:

user@localhost: ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/Users/user/.ssh/id_dsa): id_dsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in id_dsa.
Your public key has been saved in id_dsa.pub.
The key fingerprint is:
16:8e:e8:f2:1d:c9:b9:cf:43:9a:b3:3c:c1:1f:95:93 user@localhost

This will create a private key written to ~/.ssh/id_dsa and a public key written to ~/.ssh/id_dsa.pub. The passphrase is used to protect your key. You will be asked for it when you connect via SSH.

You should load your private SSH key using the following command:

user@localhost: ssh-add id_dsa
Enter passphrase for id_dsa:
Identity added: id_dsa (id_dsa)

(The passphrase is the same as the one you have set during the generation of the SSH key.)

Before proceeding with the SSH connection make sure that the SSH option is enabled for the corresponding VPS account and the SSH keys are loaded on the server.

Now you are ready to initiate an SSH connection:

user@localhost: ssh <USER>@<HOSTNAME> -p<PORT>

<USER> – the user for which you want to establish the SSH connection. This is the same as your cPanel username.

<HOSTNAME> (or IP address) - here you should enter the host/IP of your VPS.

<PORT> - the port for the connection;

Press "Enter" and if everything has been set up properly, you will establish an SSH connection to your account.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to load an SSH key in Transmit

In order to load an SSH key in Transmit, the key has to be in either PEM or PuTTY (.ppk) format....

How to Connect to Telnet via Mac Terminal

To connect to a server on its Telnet port via your Mac's Terminal application, you need to follow...

Apple/Mac client-side website checks

Prior to posting a website down ticket from your Help Desk it is recommended to test the...

How to log in to my Hostlantern shared account via SSH in Mac OS?

First you should generate an SSH key pair on your Mac OS. Alternatively, you can generate the...

How to log in to my Cloud hosting/VDS via SSH in Mac OS?

The following instructions are valid only for Hostlantern customers. If you are not a Hostlantern...