how to setup no-password ssh login
1. Use ssh-keygen to generate a pair of public and private keys
ssh-keygen -t dsa # or -t rsa
it will generate a id_dsa and id_dsa.pub in ~/.ssh/ directory
2. Copy the public key to remote machine and add it to ~/.ssh/authorized_keys
cat id_dsa.pub>>authorized_keys
3. make sure authorized_keys has correct file attribute.
chmod 640 authorized_keys
chmod 700 .ssh
4. Or use puttygen to generate a key-pair and copy public key to the remote machine, if we use putty to login to the server.
5. Make sure you're using scp or ftp to copy the public key from one machine to another. Note Cut and paste may make the key not working. Use cat id_dsa.pub >>authorized_keys to add the additional keys.
6. Change file permission to 640, chmod 640 authorized_keys
ssh-keygen -t dsa # or -t rsa
it will generate a id_dsa and id_dsa.pub in ~/.ssh/ directory
2. Copy the public key to remote machine and add it to ~/.ssh/authorized_keys
cat id_dsa.pub>>authorized_keys
3. make sure authorized_keys has correct file attribute.
chmod 640 authorized_keys
chmod 700 .ssh
4. Or use puttygen to generate a key-pair and copy public key to the remote machine, if we use putty to login to the server.
5. Make sure you're using scp or ftp to copy the public key from one machine to another. Note Cut and paste may make the key not working. Use cat id_dsa.pub >>authorized_keys to add the additional keys.
6. Change file permission to 640, chmod 640 authorized_keys