SSH Password less login Using SSH Keygen
If you do not want to type SSH password every time when you login the remote server remotely by SSH. So it can be done by a public key. You can do ssh login with command or ssh no password will be prompted and ssh to Linux server.
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 the user profile. So you will have to make it.
Step 1: Create a Directory .ssh and inside create a file name 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 the remote host.
You can see the SSH key by running the below command
Step 3 : Now copy the key from id_rsa.pub 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 the user ‘Aryan’ from the client machine.
That’s it. ssh no password prompt ssh login command ssh server linux