SSH Keys

Using SSH keys is the best practice and recommended method. If you set a user password in your image, every VM created with this image will share the same password, and will be suseptible to brute-force attacks.

Please note that,

  • ..if you are using Windows Virtual Machines, you do not need to create SSH keys.
  • ..if you are using Linux Virtual Machines, password-based access is not supported. You must use SSH keys.

If you are creating Linux virtual machines, you will need to create or upload a SSH key before creating your machine. This will then be provisioned automatically in the newly created instance.

There are two ways to provision your key pair, so that you can access your virtual machines. You can either import an existing SSH public key or create a new key pair.

First click on the left column in the SWITCHengines dashboard: Project -> Compute -> Key Pairs.

access key pairs

 

You have two options: either import an existing SSH public key or create a new key pair.

key pairs create import

Option 1: Import SSH-Key

With the import function you can import a previously created SSH key (e.g. one you have already created on your laptop) with a simple cut and paste function.

Openstack support rsa and ecdsa SSH key type. The SSH key type ed25519 will be supported in future release.

To do so, open your public ssh key file and copy your public key to the clipboard. The public key is usually in ~/.ssh/id_rsa.pub, but you may need to check your specific documentation for your local environment.

Please make sure that your Key Pair Name or Public Key does not use any accented characters such as ä, ö, ü, é, à, etc.

import public key

Give the Key Pair Name (e.g. batman-key), paste your public key from the clipboard into the Public Key field, and finally click on Import Key Pair.

Your key is now ready to use.

(You can also import key pairs in the Key Pair tab of the dialog box when you create a new VM using the Quickstart guidelines.)

Option 2: Create a (new) key pair

You can also create a new ssh key pair. To do so, click on Create Key Pair.

create ssh key name

 Choose a name for the key pair. Click on Create Keypair.

create key pair

Copy the given private key to your clipboard and save it to a file in a safe location on the machine you will use to connect, making sure it has not been stored in a format that introduces complex formatting or layout such as additional line breaks. Protect it so that no other users can access it. How to do this will depend on your local machine setup so you may need to check with your IT support or read specific documentation for your environment.

Once securely stored click on Done and your key pair is ready to be used.

You are able to access your public key by clicking on the name of the the created key pair.

created key pair

For more information about use of SSH keys, please check the FAQ. In particular