Yeah, shitloads of these guides are already out there. This is just a note more for personal use. This is useful for running rsync over SSH in an automated script.

 

Generate key on client side and secure it:

mkdir ~/.ssh;cd ~/.ssh;ssh-keygen -t rsa;cat id_rsa.pub >> authorized_keys;chmod 600 authorized_keys

 

Use ssh-copy-id utility to copy public key to target machine:

/usr/bin/ssh-copy-id -i ~/.ssh/id_rsa.pub root@remoteserveraddresshere

Comments are closed.