Código:
server1~$ ssh-keygen #no le pongas password solo dale enter
Generating public/private rsa key pair.
Enter file in which to save the key (/home/libso/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/libso/.ssh/id_rsa.
Your public key has been saved in /home/libso/.ssh/id_rsa.pub.
The key fingerprint is:
server1~$ cat /home/libso/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAseP3rpDJtdQK31/W3cw8esE0VivJb2PWC [...]
==========
server2~$ echo "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAseP3rpDJtdQK31/W3cw8esE0VivJb2PWC [...]" >> /home/libso/.ssh/authorized_keys
==========
server1~$ scp archivo servidor2:/home/libso
y si quieres hacerlos del server2 al server1 solo has lo contrario suerte