SSH Passwordless Login Using SSH Keygen in 5 Easy Steps

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Use our Linode referral link if you plan to buy VPS (it starts at only $10/month).
  4. Support us via PayPal donate - Make a Donation
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux course in 5 Days

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

Receive Your Free Complimentary eBook NOW! -

Download Free Linux eBooks

Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Introduction to Linux - A Hands on Guide

You may also like...

155 Responses

  1. J.R.Einhorn says:

    Hi – Thanks for this information. I followed your instructions with the ssh client on Solaris 10 and the target on RHEL-7. If the target has SElinux disabled, it works. But if the target has SElinux enabled, it does not work.
    I was able to fix it by following the instructions here:

    chown -R : ~/.ssh
    chmod 700 ~/.ssh
    chmod 600 ~/.ssh/*
    restorecon -R -v ~/.ssh

  2. Ravikumar Wagh says:


    Thanks for post.
    I have one query :
    I want to reset password of multiple servers with an script, Can we pass password as parameter while ssh to set new password.
    in parameter.

    Thanks !

  3. Ravi says:

    Cool post. Thanks

  4. Pradeep Kumar B says:

    Hi All,
    I have a question on automation.
    I have EMC datadomain boxes runs on proprietary RHEL, I have a command called “df” which will provide status of the file system.
    I would like to add this command into a script along with RSA SSH passwordless authentication with a time out of 30 sec. Can you please help / share some idea

    • Ravi Saive says:


      First create a SSH passwordless authentication on the server that you want to connect to remote host and then create a script with df command and run with cron every 30 seconds..

  5. KOMO sava says:

    Hi Ravi Saive,
    i would like use ( ssh user@ ssh -version ) but i no need type my password again.
    please help me write script.

  6. Rajveer says:

    Thanks for your great article. it is really awesome.
    Now I have a question here.. please suggest me…

    suppose I have a server ( with SSH enable and one of my client ( is accessing it from any user account. After performing some task on server, the client close the ssh session. Now on server end, I want to check what the client did, which commands did he run (total activity by client)
    could you please tell me ho can I do that on server end?

    Thanks in advance!

  7. Vipin Bansal says:

    After following your steps, It’s still asking for password. On one machine, was already present and able to do passwordless ssh on most of other client machines but not able to do on one. The one on which, these steps didn;t worked has “.ssh” folder with 700 permission and inside that “authorized_keys” file only with 640 permission. Nothing else is present, I just used following command as file was already present:
    cat .ssh/ | ssh ‘cat >> .ssh/authorized_keys’

    Still asking for password. Can you please help. I have restarted sshd also from my client machine.

  8. sahil says:

    issue resolved….Thank you

Got something to say? Join the discussion.

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

Join Over 95000+ Linux Users
  1. 77,543
  2. 4,213
  3. 35,218

Enter your email to get latest Linux Howto's