$ ssh root@<hostname>
root@<hostname>'s password:
Linux <hostname> 3.16.0-11-amd64 #1 SMP Debian 3.16.84-1~deb7u1
(2020-06-12) x86_64
[...]
<hostname>:~# logout
Connection to <hostname> closed.
$ ssh-copy-id root@<hostname>
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s),
to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you
are prompted now it is to install the new keys
root@<hostname>'s password:
Number of key(s) added: 1
[...]
$ ssh root@<hostname>
root@<hostname>'s password: