Thursday, December 27, 2012

CentOS ssh login without input password by using PuTTY

1. Use puttygen.exe to generate the public key and private key. Click the "Generate" button.


 2. Move your mouse to add randomness.


3. [IMPORTANT] Copy the selected text and append it to the file .ssh/authorized_keys on the Linux server.


4. Click the "Save private key" button to save your private key. I save it to the directory where PuTTY is installed and named it id_rsa.ppk


5. Use the just created private key.


6. You still have to log in with your password the last time. Set SELinux file security contexts.

  sudo restorecon -R -v /home/$ACCOUNT/.ssh 


7. Happy SSH!

No comments: