how to create private and public keys for your linux or Mac (Tired of password? )
>ssh-keygen -t rsa
/home/yourname/.ssh/id_rsa (private key) (just press Enter)
Enter passphrase (just press Enter)
nter same passphrase again: (just press Enter)
you will get private key (id_rsa) and public key id_rsa.pub under /home/yourname/.ssh/
scp id_rsa.pub to your remote machine under /home/new_machine/.ssh (if you do not see directory .ssh, just create it)
then cat id_rsa.pub to /home/new_machine/.ssh/authorized_keys (if you do not see file authorized_keys, just create it)
cat id_rsa.pub >> authorized_keys
done!
note: you never send your private key to someone, you only send your public key to someone