Skip to main content

Installing public key on OpenSSH server

In this section we will copy your public RSA key to the ~/.ssh/authorized_keys file on server.

The .ssh notation denotes a hidden folder.
This folder should be inside the home of the user connecting.

Please notice that on the server, the .ssh folder may not exist.
In which case you will need to create it.

In our example, we check that the .ssh exist:

$ ls -lh /home/fperou/.ssh
authorized_keys

If the .ssh folder does not exist, create it using the user account:

$ mkdir ~/.ssh
$ touch ~/.ssh/authorized_keys

Copy the content of the public key (on smart card) to the ~/.ssh/authorized_keys file (on server). In our example:

ssh-rsa AAAAB3NzaC1yc2EAAAADAQ********9FFu/w6l7P5KsndWgP