Home > IT Architecture, Linux, Systems, Unix > ssh passwordless login with private key

ssh passwordless login with private key

June 7th, 2018

On Server Side:

su - username

cd .ssh/

cat id_rsa.pub >> authorized_keys #if there is no id_rsa/id_rsa.pub, then generate them using "ssh-keygen -t rsa". When prompt for password, leave it empty

On Server Side:

Make sure "RSAAuthentication yes", "PubkeyAuthentication yes" is there in /etc/ssh/sshd_config (restart ssh if modified)

Make sure .ssh is 700, authorized_keys is 600

Copy id_rsa to client side, rename it as "private.key"

On client side:

chmod 600 private.key

ssh -i private.key username@server

Good Luck!


Categories: IT Architecture, Linux, Systems, Unix Tags:
Comments are closed.