How to add an SSH key on the server?

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.

  1. Log in to the server.
  2. Enter the command in the terminal nano .ssh/authorized_keys
  3. Add a public SSH key in the open file on a new line. You can see how to generate it in our tutorial.
  4. Save the changes to the file by clicking Ctrl+x, then y and finally Enter.
  5. The file was saved. Now the owner of the added public key can log in to the server.
  • ssh key, add ssh key, klucze ssh, dodać klucz ssh, logowanie ssh, ssh login
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

How to add a task to Cron on the server?

Adding Cron to a server is not a difficult task, even though it requires using a terminal and...

How to set SSH tunel

Setting up SSH tunnel is an effective solution, for example, if you want to log into the remote...

How to generate SSH key?

To generate an SSH key in Windows you will need an additional application. In case of Linux or...

How do I log in to server with FileZilla?

Not everyone needs/can use the SSH connection and there is nothing wrong with it. But how to...

Configuration of backup space

Please note that usernames u00000 and u00000-sub1 are examples only. Please replace them with the...