You should be able to use
ssh-copy-id user@host
That will copy your ssh-key from the current system to
host. If you have more than one key in your
.ssh
folder, or added via ssh-add, you can select the key you wish to copy using the
-i
option. e.b.
ssh-copy-id ~/.ssh/id_ecdsa user@host
If you don't have ssh-copy-id, you'll have to copy the key manually
localhost$ scp ~/.ssh/id_ecdsa.pub user@remote:
localhost$ ssh user@remote
user@remote‘s password:
remotehost$ cat id_ecdsa.pub >> .ssh/authorized_keys
remotehost$ chmod 600 .ssh/authorized_keys
remotehost$ exit