##How To scp, ssh and rsync without prompting for password ######By jkini on Oct 17, 2007 ######Edited by Yuan Yuan on Feb 29, 2016
host_src = you, host_dest = remote
-
On host_src: If you've previously generated SSH keys before,
$ ssh-keygen
shows where it saved the public key. This is by default~/.ssh/id_rsa.pub
If you've never generate a SSH key before, do so by running this command:$ ssh-keygen -t rsa
. This will prompt for a passphrase. Just press the enter key. It'll then generate an identification (private key) and a public key. Do not ever share the private key with anyone! -
Transfer the
id_rsa.pub
file to host_dest by either ftp, scp, rsync or any other method (see http://www.hypexr.org/linux_scp_help.php)