This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

Introducing Cloudways Community Forum. Start Discussions and Get Instant Help From Cloudways Community. JOIN NOW

How to Set up SSH Keys (Password-less SSH)June 30, 2017

 

In this KB

  • Creating an SSH key pair
  • Add/Update SSH keys
  • Password-less SSH Access

 

SSH keys provide a more secure way of logging into your server/applications with SSH than using a password. These keys can be set for both Master and Applications credentials, we will cover both in the steps below.

Step 1: Create SSH Key Pair

The first thing that you need for password-less access is an SSH key pair. Following links have instructions on how to generate it for different operating systems:

In this example, we are using PuTTY Key Generator to generate a public/private key pair.

When you click on Generate button (1), your public/private key pair will be generated. You must then copy the public key (2) and save it somewhere on your computer (this is the one we will upload to your Cloudways server) and also save the private key (3).

1

Step 2: Choose Target Server

Log into the Cloudways Platform with your credentials. Click on Servers in the top menu bar. Then, select the server you want to access with your new SSH key. Now, depending on whether you are using Master or Application credentials, you will have to upload your SSH public key in a different place.

Cloudways platform

Step 3a: Using Master Credentials

If you are using Master Credentials for SSH access, then you need to go to the Server Management area and then Master Credentials section. Click on SSH Public Keys.

Master Credentials

Add a label for key and paste your public SSH key that you saved in the first step (don’t paste here the private key!). Hit Submit when done.

Add/update keys

Step 3b: Using Application Credentials

If you are using Application Credentials for SSH access, then you need to choose your target application, click on the Application Management area and then the Access Detail section.

Now choose a set of Application Credentials and click on SSH KEYS.

ssh keys

Add a label for key and paste your public SSH key that you saved in the first step (don’t paste here the private key!). Hit Submit when done.

Step 4: Password-less SSH Access

Now that you have successfully uploaded your public key, you should be able to securely log into your server/application without being prompted for a password.These instructions are specifically for PuTTY. If you are using some other SSH client or the SSH command line, you need to research how to use SSH keys with them.

  1. Launch PuTTY.
  2. Under the Connection menu, SSH section, select Auth.
  3. Locate your private key. 2
  4. To establish a session, click on Session under the Category list.
  5. Enter the hostname or IP address of your Cloudways server (format [ssh-user-name]@[server-ip OR FQDN]) and port number ’22’.
  6. Click the Open button to establish a connection.6

That’s it. You have learned how to upload SSH keys to the Cloudways server.

 

Please insert Content
Have Questions? Ask From Our Helpful Community

3 Responses

  1. Paul Driver says:

    The ssh documentation for Mac OSX is terrible and chat support seems only to understand Windows and Putty. I ended up using using the github docs at https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/

    After upload a good public key which I can successfully use elsewhere I was still being prompted for a password.

    From the github docs Step 2 from “Adding you SSH key to the ssh-agent’ was needed before Cloudways would recognise my key.

    Maybe this is basic stuff but it was not obvious to me and not documented on Cloudways as far as I can tell.

    Hope this helps others.

    • Paul Driver says:

      Further to the above, I don’t recommend entering a passphrase unless your computer is used by others.

  2. ron says:

    If you are using a PC, you can use Auto FTP Manager to transfer files to your mac securely.
    http://www.deskshare.com/ftp-client.aspx

Do you still need help?

Our Technical Support team is always at work.