SSH Passwordless Login Using SSH Keygen in 5 Easy Steps

If you have any questions or problems regarding this article and want help within 24 Hours? Ask Now

Ravi Saive

Simple Word 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.

Receive Your Free Complimentary eBook NOW! -

Download Free Linux eBooks

Advanced Bash-Scripting Guide
Linux Bible
A Newbie's Getting Started Guide to Linux
Ubuntu Linux Toolbox: 1000+ Commands

You may also like...

122 Responses

  1. sanjay says:

    Hi Ravi,

    I would like to run security,critical updates on my centos server on weekly basis please suggest to me which is best commands.

    • Ravi Saive says:

      @Sanjay,
      Just yum update will fix all critical security bugs or you can update specific packages via yum..

      • sanjay says:

        If I run the yum update,kernel also update if kernel is update can we get any issues

        • Ravi Saive says:

          @Sanjay,
          Yes, if you do ‘yum update’ all packages including kernel will update, but I don’t think you will face any issue and it’s always recommended to do a update weekly..

  2. vikas says:

    very helpful

  3. Sandeep says:

    I am stuck at Step 3: cat .ssh/id_rsa.pub | ssh user@machine ‘cat >> .ssh/authorized_keys’. While running this I am getting error: “The System cannot find the path specified”. To validate I run only ‘cat .ssh/id_rsa.pub’ and it worked fine. Then when I tried ssh user@machine ‘cat >> .ssh/authorized_keys’ it again gave the same error “The System cannot find the path specified”. I validated the authorized keys path on target machine and it is located at /u/pub/.ssh/authorized_keys. So I run ssh user@machine ‘cat >> /u/pub/.ssh/authorized_keys’ but still getting the same error. Running out of my mind now. Please help.

    • Ravi Saive says:

      @Sandeep,
      Strange error even after specifying path correctly, on which distro are you trying? if possible can you restart the system try (not needed but just a suggestion).

  4. Bikash Moharana says:

    The best one !!! thank you :-)

  5. Balkrishna says:

    Hello Ravi,

    In above example user sheena is on which machine? ie.on client machine or remote host?

  6. me says:

    This article is entirely too specific in its naming scheme; readers shouldn’t have to memorize random particulars in order to follow your guide.

  7. Nabil says:

    Works perfectly with the clear instructions! Thx

  8. Xin Wang says:

    The instruction is extremely clear and correct. But could you provide why we need to set permission of file “authorized_keys file” to 640?

  9. warren says:

    pulling my hair out! I seem to have no issue logging into my ubuntu 14.04 with the account ‘warren’ on both, but i set this up with a user ‘gituser’ on the server and cannot for the life of me get it to login automatically form warren@local to gituser@server. Any tips would be appreciated.

    • Christian says:

      What are the access-rights of your .ssh-directories? They should be ‘700’ for each user, if not, ssh refuses pw-less login for security reasons.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Join Over 75000+ Linux Users
  1. 51334
  2. 2657
  3. 16705

Enter your email to get latest Linux Howto's