Suppose you have two machines, the local one (you) and the remote one (remote.com).
To ssh from the local to the server without needing a password, perform these steps:
ssh-keygen -t rsa
(don’t use a passphrase. Just hit return twice)
scp ~/.ssh/id_rsa.pub remote.com:
- On the remote machine (remote.com)
cat ~/id_rsa.pub >> ~/.ssh/authorized_keys