SSH Passwordless Login Using SSH Keygen

SSH Passwordless Login Using SSH Keygen

SSH Client :
SSH Remote Host :

Step 1: Create Authentication SSH-Kegen Keys on – (

# ssh-keygen -t rsa

Step 2: Create .ssh Directory on –

Use SSH from server to connect server using sheena as user and create .ssh directory under it, using following command.

# ssh sheena@ mkdir -p .ssh

Step 3: Upload Generated Public Keys to –

Use SSH from server and upload new generated public key ( on server sheena‘s .ssh directory as a file name authorized_keys.

# cat .ssh/ | ssh sheena@ ‘cat >> .ssh/authorized_keys’

Step 4: Set Permissions on –

Due to different SSH versions on servers, we need to set permissions on .ssh directory and authorized_keys file

# ssh sheena@ “chmod 700 .ssh; chmod 640 .ssh/authorized_keys”

Step 5: Login from to Server without Password

From now onwards you can log into as sheena user from server as tecmint user without password.

# ssh sheena@

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *