Configure ssh to remote host with no prompt for password

  General, Linux

You can achieve this with 3 simple steps:

1- Create you local key on your host (where you will be connecting from)

ssh-keygen -t rsa

2- Create a directory on the remote host to store the keys

ssh root@n01 mkdir -p .ssh

3- Copy the local host key into the remote host’s directory

cat .ssh/id_rsa.pub | ssh root@n01 'cat >> .ssh/authorized_keys'

4- Test the connectivity

ssh root@n01

5- Profit !

Leave a comment