ssh-copy-id -i ~/.ssh/my_key_rsa user@server_address
Uncomment the following line from the sshd config file located at /etc/ssh/sshd_config
AuthorizedKeysFile %h/.ssh/authorized_keys
Then restart the ssh deamon
$ sudo systemctl restart sshdCreate the authorized_keys file in the .ssh folder of the home folder of the user you want to connect with.
$ touch ~/.ssh/authorized_keys
$ chmod 600 ~/.ssh/authorized_keysAdd the content of your id_rsa.pub file in the authorized_keys file on the server.