ssh password less login

SSH Password less login Using SSH Keygen  

If you do not want to type SSH password every time when you login remote server remotely by SSH. So it can be done by a public key.

You will have to create a SSH key for a user and I have a user Aryan and the Password is ****.

Check Out Disable SSH For Root Login

By default, there won’t be any .ssh directory in user profile. So you will have to make it. 

ls -a

Step 1 : Create a Directory .ssh and inside create a file name authorized_keys

mkdir .ssh

touch authorized_keys

Check Out : Create SSh Key

Step 2 : Create a SSH Key

ssh-keygen -t rsa

It will create a public key, you just need to copy it and paste inside authorized_keys on remote host.

You can see the SSH key by running the below command

cat .ssh/

ls .ssh/

Step 3 : Now copy the key from to authorized_keys

Check Out Install SSH agent

Then change the permission on directory and file

chmod 700 .ssh

chmod 640 authorized_keys

Now try to login with user ‘Aryan’ from client machine.

You’re done



Please enter your comment!
Please enter your name here

three × two =