Basic ssh
/home/user/.ssh/config
Host my_friendly_host_name
User my_remote_user
Hostname my_host_ip_or_name
PreferredAuthentications publickey
IdentityFile /home/user/.ssh/id_rsa_my_remote_host
- Generate key in my local machine:
ssh-keygen -t rsa
Save that key under /home/user/.ssh/id_rsa_my_remote_host
- Copy the public key /home/user/.ssh/id_rsa_my_remote_host.pub and paste into the file /home/my_remote_user/.ssh/authorized_keys under the remote machine.
If the `authorized_keys has other keys, add the generated public key at the end of the file.
- Connect to the remote machine
ssh my_remote_user@my_friendly_host_name