Creating and Uploading your SSH Public Key

Mac OS X and Linux

This brief tutorial will explain how to create and upload your public key with a WebEnabled application using Mac OS X. The steps are nearly identical for almost any variant of Linux. You need to first open a terminal. This tutorial assumes you have some basic knowledge of how to open a shell and run commands. You can also learn more about ssh-keygen by typing man ssh-keygen at the command prompt.

1. Create your Key

Once you have a terminal open you can generate a key using the ssh-keygen program. The exact example command for this is as follows and is shown in the next screenshot.

$ ssh-keygen -t rsa

Creating your key in the terminal.

Store the password in a safe place or memorize it. You will need it when you login over SSH.

2. Copy your Public Key to the Clipboard

You will need to copy the content of /.ssh/id_rsa.pub to the clipboard. This can be done using the following command in the terminal.

$ cat .ssh/id_rsa.pub | pbcopy

3. Paste the Key Into WebEnabled and Upload It

In this next step you will upload your key to the application vhost using WebEnabled. You can do this for any application you have been granted access to on WebEnabled.

  • Login to your account on www.webenabled.com.
  • Find the application you want to upload your key to.
  • Click on the Manage link and the application info page will load with a list of actions on the right side.
  • Click on the Upload Public Key action.
  • In the text box provided paste your key from the clipboard as shown below.
  • Submit the form.

Once the form is submitted successfully you will see a blue message at the top that tells you your key was uploaded to the application successfully. The next and final step is to login to your application.

Cut and paste your key.

4. Login to your Application Using SSH

You can now login to your application vhost without the shell password using the username provided on the Manage page. You can use any program that is smart enough to use the SSH keys including OpenSSH, Coda, and many others.

For this example you can just type the ssh command provided on the Management screen of the application you uploaded your key.

$ ssh -l w_user user.dev3.webenabled.net

Windows

This brief tutorial will explain how to create and upload your public key with a WebEnabled application using Windows. We will be using the popular and free SSH program called PuTTY. You need to first download PuTTY and PuTTYgen. This tutorial assumes you have some basic knowledge of how to open a shell and run commands. You can learn about and get PuTTY at http://www.chiark.greenend.org.uk/~sgtatham/putty/.

1. Create your Key with PuTTYgen

Start the PuTTYgen program you downloaded. Click on the Generate button as shown in the following screenshot. You should use SSH-2 RSA as the parameter and at least 1024 bits for the key length.

Creating your key in PuTTYgen.

2. Save your Public and Private Keys to a Safe Place

Using the provided functions available in the PuTTYgen program, save your public and private keys. PuTTYgen will open a dialog window for you to provide a location and filename. It is highly recommended that you before saving the private key you enter a password to lock your private key. This will enhance the security of your key in case the private key is stolen.

3. Copy your Public Key to the Clipboard

Copy the entire key to the clipboard.

Copy the key from PuTTYgen to the clipboard.

4. Paste the Key Into WebEnabled and Upload It

In this next step you will upload your key to the application vhost using WebEnabled. You can do this for any application you have been granted access to on WebEnabled.

  • Login to your account on www.webenabled.com.
  • Find the application you want to upload your key to.
  • Click on the Manage link and the application info page will load with a list of actions on the right side.
  • Click on the Upload Public Key action.
  • In the text box provided paste your key from the clipboard as shown below.
  • Submit the form.

Once the form is submitted successfully you will see a blue message at the top that tells you your key was uploaded to the application successfully. The next and final step is to login to your application.

Cut and paste your key.

4. Login to your Application Using PuTTY

Go ahead and open the PuTTY in Windows. You will need to tell PuTTY where the private key is that you saved in step 2. This is located in the Category tree on the left side. It is under Connection -> SSH -> Auth. Click on the Browse button under the "Private key file for authentication" text. Locate and select your private key file and Open it.

Tell PuTTY about your SSH key.

Finally, enter the hostname in the Session section. Click the Open button at the bottom right. If everything worked properly you should be able to login without entering a shell password.

Enter your application hostname and then login.

You can now login to your application vhost without the shell password using the username provided on the Manage page. You can use any program that is smart enough to use the SSH keys including PuTTY.