Monday, January 25, 2010

SSH Login without password

In order to log from host A onto host B without a password, you need to add the RSA key from host A into the trusted key list of host B. In order to do that, follow theses steps:
  1. Create RSA Key as a user. Don't enter any passphrase. The generated public key will be stored in HOME/.ssh/
    ssh-keygen -t rsa
  2. Create on host B .ssh folder
    mkdir ~/.ssh
  3. Export RSA public key to host B with this command on host A
    cat .ssh/ | ssh b@B 'cat >> .ssh/authorized_keys'
  4. Be sure that the permission are 700. You can this command to set permission
    chmod -R 700 ~/.ssh

No comments:

Post a Comment