Configuring additional SSH keys

This guide will explain how to configure additional SSH keys for your instance in order to grant access to other people.

Last updated 13th March 2019


When creating an instance, it isn't possible to configure only one SSH key. However, you can still grant access to other users who have SSH keys for your instance by configuring the authorized_keys file.

This guide will explain how to configure additional SSH keys for your instance in order to grant access to other people.



Creating the SSH key

First, follow our guide to Create your first SSH keys.

Configuring the new user

Next, connect to your instance via SSH and use the commands below to create a new user:

admin@server-1:~$ sudo adduser user2

Adding user `user2' ...
Adding new group `user2' (1001) ...
Adding new user `user2' (1001) with group `user2' ...
Creating home directory `/home/user2' ...
Copying files from `/etc/skel' ...

Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for user2
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Is the information correct? [Y/n] Y

Next, save a new public SSH key in the personal folder of the new user, using the command below:

admin@server-1:~$ sudo vim /home/user2/.ssh/authorized_keys

If the .ssh file doesn't already exist, you can create it with this command:

admin@serveur-1:~$ sudo mkdir /home/user2/.ssh/

From now on, you can connect with this user using the private key linked to the one you've configured.

root@server:~$ ssh

Linux server-1 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u1 x86_64
Last login: Fri Oct 16 08:14:24 2015 from


You can configure another SSH key for the admin user by adding them to the corresponding authorized_keys file with this command:

admin@server-1:~$ sudo vim /home/admin/.ssh/authorized_keys

Go further

Create SSH keys

Replacing your lost SSH key pair

Join our community of users on

Did you find this guide useful?

Please feel free to give any suggestions in order to improve this documentation.

Whether your feedback is about images, content, or structure, please share it, so that we can improve it together.

Your support requests will not be processed via this form. To do this, please use the "Create a ticket" form.

Thank you. Your feedback has been received.

These guides might also interest you...

OVHcloud Community

Access your community space. Ask questions, search for information, post content, and interact with other OVHcloud Community members.

Discuss with the OVHcloud community