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. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

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.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

221 Responses

  1. Edison says:

    Great tutorial! Very clear…I took 5 minutes to set up my computers

  2. Trevor McPherson says:

    Great tutorial – best I’ve seen and I’ve been looking for a while. There are a couple of places where its not quite clear, for example “your password” presumably means you/me as root, but the reader might think its Sheen’s password (perhaps Sheena is the user/owner at the other end etc.. And if the destination machine has a different password presumably its for that machine for you/me and not the one for your/my source machine etc.

  3. Malin says:

    This is a great tutorial, nonetheless maybe it should be updated to learn folks how to generate even stronger RSA keys.

  4. pintu says:

    After the whole process I am not able to login without password.

  5. Min says:

    Question: What happens if the users tecmint or sheena’s password are changed? Can sheena still log into and then to server as tecmint user without password to execute anything?

    Thank you.

    • Ravi Saive says:


      Yes, even after password change user able to login without any password, as SSH works on Key authentication.

  6. Gcina Zondi says:

    Amazing tutorial, you really saved me!

  7. Hermes says:

    Outstanding tutorial! thumb up!

  8. R says:

    Tried using the -copy-id but got the error message command does not exist.

    is it available in some newer vesrions

    • DjK4M5Y5 says:

      ssh-copy-id is a binary from standard package named ‘openssh-client’. If you are using system newer that 2010 I guess you should have it :)

  9. DjK4M5Y5 says:

    Ever heard of ssh-copy-id ? :) You can replace this whole tutorial to just two steps :)

    On machine from you login to other machine
    1. ssh-keygen -t rsa
    2. ssh-copy-id [email protected]
    3. provide password and voilla – that’s it

    • Matt says:

      Interesting fact: the ssh-copy-id “binary” is actually a shell script located in the bin folder, marked executable. So, if you need to work with ssh servers that need to use (for instance) a port other than 22, you can edit the binary with a text editor.

    • mm says:

      Great thanks, it is awesome :)

  10. Jesus Avina says:

    Awesome!!!! I spent about 6 hours on this.

Got something to say? Join the discussion.

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.