Setting an SSH key

Note

Nectar images are set up to be password-less by default, and thus can only be accessed via a cryptographically signed public and private key set.

To set an SSH key pair, click the Compute tab on the left panel, and then select Key Pairs. If you have previously set an SSH key pair, then it will show up here, and you can reuse it for your instance. (Skip this section if you want to reuse your key).

If you've never set an SSH key pair, or you'd like to set a new one, then you can either:

  1. create a new SSH key pair; or
  2. import an existing public key on your local machine (if you have one).

Create new key

To create a new key pair, press + Create Key Pair. Give your key a name and select SSH Key for the Key Type. Then press the Create Key Pair button.

This will download a private key to your downloads folder with the suffix .pem. In our case, the key is called nectarkey.pem.

It is good practice to store the key in the ~/.ssh directory. To move the key, open a terminal and type

$ mv ~/Downloads/nectarkey.pem ~/.ssh/.

Then, change its permissions to be more secure by typing

$ chmod 600 ~/.ssh/nectarkey.pem

Import existing key

Alternatively, if you already have a public key on your local machine that you wish to use, you can import it by pressing Import Public Key. Give the key a name, select SSH Key as the 'key type' and either paste the public key in the text box or click 'choose file' and select it in the file manager.

Danger

Make sure you are copying your PUBLIC key (should have the extension .pub) and not your PRIVATE key!

See also

For a more detailed explanation of key pair authentication for the Nectar research cloud, see the SSH key tutorial page.