Adding your SSH key to your vCluster

By Joe Gardiner Monday, 8th March 2010

SSH (Secure Shell) is a way of controlling your vCluster through a terminal command prompt. This offers great control to the user, but requires you to authenticate your SSH key with the vCluster system.

To allow your computer to connect to your vCluster through a secure shell environment, it is necessary to add your SSH key in the vCluster settings section of the CatN control panel.

We need to copy our SSH key into the text box provided, so lets lookup your SSH key.

The process is different depending on your Operating System. Below is the guide for Mac OSX and Linux shells, browse down for the Windows guide.

Adding your SSH Key – Mac OSX

To generate a new key view this guide.

[youtube video="z6xpBO0B0VA" align="left" author="Joe Gardiner - CatN" bgcolor="#000000" color="#336699"
hd="true" height="300" title="Adding your key in MacOSX" width="500"]

First we need to open a terminal. In your mac spotlight bar, type in “Terminal”, select the first option, called… Terminal!

In the terminal screen type:

ssh-add

This will add your SSH key to the SSH keyring. Now we’re going to check the key has been added correctly and display it in the terminal so you can copy it into the vCluster page.

Now you need to type:

ssh-add -L

(make sure it is a capitalised letter L). This will display your SSH key. Note: I have deleted some parts of my key for security reasons.

Now select and copy (Apple key + C) the entire key, and open up your vCluster settings page in the CatN control panel.

Click into the SSH key text box and paste your key (Apple key + V).

Now your key is in the box, select “Update Keys” to add your SSH key to the vCluster.

You can now SSH in a terminal to browse your vCluster.

Adding your SSH Key – Windows

[youtubevideo="42ItbKNmvpo" author="by Joe Gardiner - CatN" bgcolor="#000000" color="#336699" hd="true" height="300" title="Using PuTTY in Windows" width="500"]

In Windows a couple of light weight applications are required, as the windows command prompt does not support ssh natively.

Head to http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html which is the download page for a program called PuTTY. You want the installer that cntains everything apart from PuTTYtel. Note: At the time of writing there is only one installer available for download.

Run the file once it’s finished downloading and install the program.

Look in your start menu and run “PuTTYgen”. This will generate your public and private ssh keys that you can then add to the CatN control panel.

Select the “Generate” option in the actions menu, and follow the instruction to move your mouse over the empty space. These random movements will generate a unique numerical key. Move the mouse until the progress bar is full.

When complete your public key will be displayed. Select the entire key, and copy it onto your clipboard (Ctrl + C).

Naviagte to the CatN Control Panel, and to the settings section of your vCluster. Select “Add New Key” and paste the clipboard into the new empty text box. When complete select, “Update Keys”.

Now we’re going to setup the PuTTY terminal. Bring up the PuTTYgen window again, and enter a password to lock your key in the “Key passphrase” text boxes.

Select “Save public key”, and choose a location on your computer to save this file. You may find it useful to create a PuTTY folder in your My Documents. Now select “Save private key”, and again, choose a location to save this file on your computer.

Now open the folder you save the two keys in, and you should see “sshprivatekey” and “sshpublickey” saved.

Double click the “sshprivatekey” icon (monitor with a hat on!), enter your password, and you can now see the icon running in the system tray.

Right click on this icon and select “New Session”, from the pop up menu.

In the PuTTY configuration window enter the hostname from the Control Panel settings panel, e.g. access1.c1.catn.com, and select “Open”.

Type your username after “Login as:”. Note: this will be the same as your vCluster name.

If successful you will be running the terminal as [username@access1 ~]$


Posted in CatN Control Panel, Guides | 6 Comments » twitter-follow facebook-follow rss-follow

Leave a Reply

Your email address will not be published. Required fields are marked *