OVH Guides

Creating SSH keys

Find out how to create an SSH key and add it in your Public Cloud Control Panel

Last updated 14th November 2019


When you create a Public Cloud Instance, you won't receive an email with login credentials, because authentication is based on secure SSH keys instead of usernames and passwords.

This guide will show you how to create an SSH key, so that you can log into your instance.

Please note that SSH keys are not used for authentication on instances running the Windows operating system. For Windows instances, you will still need to use a username and password.



If you would like to store an SSH key in the OVHcloud Control Panel, we recommend to use RSA or ECDSA encryption. ED25519 is currently not supported.

Creating an SSH key on Linux and Mac

First, open the terminal (command line) app, then run the following command to generate a 4096 bit SSH key:

# ssh-keygen -b 4096

The command will output the following result and prompt you to save the newly created key:

Generating public/private rsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa):

The private part of the key should be kept safe, and access should be limited to people authorised to use it.

Once you have saved the key, the command line will output the following:

Your identification has been saved in /home/user/.ssh/id_rsa.
Your public key has been saved in /home/user/.ssh/
The key fingerprint is:
0a:3a:a4:ac:d1:40:6d:63:6d:fd:d9:fa:d6:b2:e0:36 user@host
The key's randomart image is:
+---[RSA 4096]----+
|      .          |
|                 |
| .               |
|. . . .          |
|. .=.o .S.       |
| =o.o. ..   .    |
|o +   .  . o ..  |
|.. .      oEoo . |
|o.        .o+oo  |

You can read and display the key with the following command:

# cat .ssh/

Running this command will output the following:

cat /home/user/.ssh/
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC8teh2NJ42qYZV98gTNhumO1b6rMYIkAfRVazl

Creating an SSH key on Windows

Using PuTTY

PuTTY is a popular SSH client for Windows. You can use it to remotely connect to a Linux server. Its companion software, PuTTYgen, can be used to create SSH keys.

First, download the PuTTYgen software, which we will use to generate the key.

Next, run the software and select RSA as the key type, enter 4096 as the number of bits to generate, and then click the Generate button.

generate key

Next, randomly move your mouse around in the area underneath the progress bar, as shown below.

generate key

As you move your mouse, the progress bar will start to fill up. When it's completely full, the key will be ready.

generate key

Import your SSH key into the OVHcloud Control Panel

First, highlight and copy the text of your public key, then log into the OVHcloud Control Panel.

Now click on the Public Cloud menu.

cloud menu

Now select your Public Cloud project from the left-hand menu.

select project

Now select the SSH keys tab. Next, paste the 4096 byte key into the space provided, give the key a name, and click the Add this key button.

save ssh key

Your key will now be saved in the OVHcloud Control Panel for authentication.

Go further

Join our community of users on

These guides might also interest you...