Configure “No Password SSH Keys Authentication” with PuTTY on Linux Servers

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 courses

We are thankful for your never ending support.

Matei Cezar

I'am a computer addicted guy, a fan of open source and linux based system software, have about 4 years experience with Linux distributions desktop, servers and bash scripting.

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

12 Responses

  1. Ravi J says:

    Whole ssh needs only a public key and private key. You’ve involved 3 files. Private, public and copy/paste of public key.

  2. Kannan says:

    Thanks for the clearly written article with snapshots. Got it on the first try. Saved a heap of trouble.

  3. Kirantej says:

    I’m getting this below error. could you please help me out. Thanks in advance

    Using username “tej”.
    Server refused our key
    tej@10.10.0.228‘s password:

    • Matei Cezar says:

      You did not uploaded the correct public key on the server or there is another issue with the generated keys! Generate another set of key-pairs and repeat the steps!

  4. Sridhar says:

    very good article.. clearly it helped me..

    Thanks

  5. Matei Cezar says:

    @XFire: a solution for keeping the key save if you need to carry it to other places would be to copy it to an encrypted USB and plug the USB whenever you need to use the key from foreign locations…This is not a final solution …just an suggestion!

  6. Matei Cezar says:

    Before configuring step 8 the the hostname and port has been already entered for this session …so there is no risk to share the private key with other sessions configured later….the key tides only on this host configuration… if you have other host to configure, generate a new pair of keys and save the session coresponding to your new host.

  7. ProTip says:

    After step 8, you can save to default settings, and PuTTY will try the key for any new host you log in to. If there is no authorized_keys file (or the permissions are incorrect), most SSH servers will prompt for a password.

  8. Mathis DT says:

    I propose to not use PuTTY but KiTTY from http://www.9bis.net/kitty/ – it’s based on PuTTY but enhanced in many ways. For example you can configure it far better than PuTTY and it offers to save passwords for you (discouraged on unencrypted systems)…

  9. Jose Benito says:

    Please, is necesary explain before about detail why this solution understand that is before of the solution, some graphic or map and the connectivity. Thanks

  10. XFire says:

    Hello. Frankly saying private key method seems more difficult to execute even more risky. Involve key for you to carry wherever you login, and your risk is greater to be stolen. A complex password combined with ssh fail2ban seems safer ( in my opinion ) . For more people scattered like me , it’s easier to remember a password either and complex than to remember where the hell is that key … Keeping them on the cloud that is accessible from anywhere do not think that is a solution.

    • Tomas says:

      Change SSH port, install and configure DenyHosts and use a *strong* SSH password, and you’re almost good to go (no need for port knocking or other overkill techniques).

      I use this configuration for years, never had a single Linux server hacked via SSH.

Got something to say? Join the discussion.

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

Join Over 300K+ Linux Users
  1. 177,942
  2. 8,310
  3. 37,548

Are you subscribed?