In order to allow other users to log in to your server, you need to add the public SSH keys of these users. You can learn how to get them from the SSH key generation tutorial.
Adding an SSH key on the server
The manual describes the procedure using nano
, but you can use any text editor.
- Log in to the server.
- Enter the command in the terminal
nano .ssh/authorized_keys
- Add a public SSH key in the open file on a new line. You can see how to generate it in our tutorial.
- Save the changes to the file by clicking
Ctrl+x
, theny
and finallyEnter
. - The file was saved. Now the owner of the added public key can log in to the server.