ssh into a remote host without password
Other than the regular password based login, one can use the public/private key based login to get into a remote server.
This is a two step process.
This is a two step process.
On the local host
- ssh-keygen // follow the prompts, enter nothing for the pass phrase. This will create a id_rsa.pub file in your .ssh folder.
On the remote server
- Log into the remote server.
- Create a .ssh folder if not already present.
- chmod 700 .ssh
- cd .ssh
- vim authorized_keys
- Copy paste the contents of the id_rsa_pub file into the above file.
- save the authorized_keys file
- chmod 700 authorized_keys
- exit and try to login again, you will not be prompted for a password.