the switch -C add the “localusername@localaddress” comment in the key content. This can be useful later because we can easily recognize to whom the key belongs to when viewing the file authorized_keys.

This command will ask for a passphrase, for simplicity leave it blank (press enter).

Now transfer the .ssh/id_rsa.pub file into the ssh folder on your remote host, maybe through scp, ftp or whatever. Then connect to your remote machine

local$ ssh remoteusername@remoteaddress

Now that we are on the remote machine, get into the home

remote$ cd

Option #1: explicitly on my Synology NAS I had to get into the /root because SSH is not enabled for normal users.

remote$ cd /root

Option #2: if the folder .ssh is not present create it plus the file authorized_keys