Thirumurthy
Thirumurthy

Reputation: 411

PuTTY fatal error: "No supported authentication methods available"

PuTTY fatal error:

No supported authentication methods available

When I tried to login into the production server, I am getting above error. Could anyone help me to fix this?

Upvotes: 33

Views: 207184

Answers (22)

lehuspohus
lehuspohus

Reputation: 1

In my case that was caused by permissions on my user's home folder.
I had to change it to more strict like:

chmod 700 /home/myuser

Upvotes: 0

Raju lorence
Raju lorence

Reputation: 1

My problem was with this one "disconnected: no supported authentication methods available (server sent: publickey, gssapi-with-mic)"

So these are the steps i followed

  1. After saving my key with .ppk i opened putty
  2. In that add your IP address that you got from AWS.
  3. Go to Data section and add a username.Adding username
  4. Go to SSH > Auth> credentials add your path where the file is and open.Adding file
  5. Done you are good to go.

Upvotes: 0

Tomer Ofer
Tomer Ofer

Reputation: 461

In my case i am using ubuntu 22, the RSA key authentication is removed.

see reference so by using ECDSA key the problem was solved.

puttygen screenshot: enter image description here

Upvotes: 1

rashedrony
rashedrony

Reputation: 21

In my case i was using frequently TortoiseGit. For some unknown reason i got the error one morning. I just checked the keys from here: putty authentication agent

Pageant Key List

There was no key while i checked. Then i just added the private key(clicking "Add key"-> select private key .ppk file). Now all ok.

Upvotes: 0

Sachin Pareta
Sachin Pareta

Reputation: 1

Please use below steps to fix this.

You are using wrong or selecting worng .pem file in puttygen. While selecting the .pem file use all files

Select all files and then select your .pem file Conclusion, Please check your .pem file and retry again.

Upvotes: 0

Jitendra Nandre
Jitendra Nandre

Reputation: 161

Putty Authentication Issue

You are using public private key authentication here, you needs generate private key using putty key generator.

This might happen because you are passing wrong ppk file (like passing public key file instead if private key) You are using public private key authentication here, you needs generate private key using putty key generator.

Once private key ppk file generated, you can upload private key file into Putty -> Connection -> SSH -> Auth

Upvotes: 0

Aminah Nuraini
Aminah Nuraini

Reputation: 19146

For Digital Ocean, we should enable password authentication first.

The complete instruction is here: https://docs.digitalocean.com/support/i-lost-the-ssh-key-for-my-droplet/#enable-password-authentication

Log in to the Droplet via the Recovery Console Even though you have a root password for the Droplet, if you try to log in via SSH using that password immediately, you’ll receive a Permission denied (publickey) error. This is because password authentication is still disabled on the Droplet. To fix this, you need to log in via the Recovery Console and update its SSH configuration.

There are detailed instructions on how to connect to Droplets with the Recovery Console for a more explicit walkthrough, but here’s a brief summary:

On the Droplet’s detail page, in the same Access tab, click the Launch Console button.

At the login prompt, enter root as the username.

At the subsequent password prompt, enter the root password you were sent via email. Most distributions prompt you to enter the password twice, but some (like Fedora 27) do not.

Enter a new root password to replace the one that was emailed to you, then enter that same new password again.

You will now be logged in as root in the Recovery Console, which gives you access to the Droplet’s SSH configuration.

Enable Password Authentication To enable password authentication on your Droplet, you need to modify a line in its SSH config file, which is /etc/ssh/sshd_config.

Open /etc/ssh/sshd_config using your preferred text editor, like nano or vim. Find the line that reads PasswordAuthentication no line and change it to PasswordAuthentication yes, then save and exit the file.

Because the SSH daemon only reads its configuration files when it’s first starting, you need to restart it for these changes to take effect. The command to do this depends on your operating system:

Operating System SSH Restart Command
Ubuntu 14.x service ssh restart
Ubuntu 15.4 and up systemctl restart ssh
Debian systemctl restart ssh
CentOS 6 service sshd restart
CentOS 7 systemctl restart sshd
Fedora systemctl restart sshd\

Upvotes: 0

Amir
Amir

Reputation: 2098

In my case, I updated the Putty application to the latest and issue was solved.

Upvotes: 27

sanket kushwaha
sanket kushwaha

Reputation: 11

Today I faced the same problem. So in putty you have to use "user name" of your EC2 instance to get your "user name" of your EC2 instance

  • Select EC2 instance
  • select Connect enter image description here

Now go to putty use ec2_name@public address

To see your public address

  • select EC2

  • under details you will be able to see your public address.

Now try loading your "ppk" file you will be able to log in.

Upvotes: 0

Mizile
Mizile

Reputation: 152

If that server is in the cloud like AWS, the rookie mistake I did was not realizing that a new Public IPv4 DNS gets used when the instance was off for some time. So, check the new DNS

Upvotes: 0

Shelby Moore III
Shelby Moore III

Reputation: 6131

This error can also be seen if you haven’t selected the .ppk file for the session in Putty: Connection > SSH > Auth

You’re done if you’ve employed PuttyGen to generate the keys. Else import the private key to your .ppk file as others have instructed.

Note on Linux as opposed to Windows, puttygen is accessed only via the command line. Here’s some resources for that:

https://the.earth.li/~sgtatham/putty/0.76/htmldoc/Chapter8.html#pubkey

http://manpages.ubuntu.com/manpages/bionic/man1/puttygen.1.html

https://www.ssh.com/academy/ssh/putty/linux/puttygen

Upvotes: 2

David Miller
David Miller

Reputation: 517

  1. Download Puttygen
  2. Load the .pem key to puttygen
  3. convert .pem file to .ppk
  4. Save as Private key
  5. Install/Open Putty >> puTTY Configuration >> Auth >> Browse >> path to .ppk file

Use this key to login to ec2 instance (check that IP of remote server is allowed in security group config of EC2 instance)

Username

The usual user names are ec2-user, ubuntu, centos, root, or admin

Upvotes: 0

helloshantanu
helloshantanu

Reputation: 51

Solved via Puttygen

I was on a windows system and it doesnt support direct shell access like linux or macOS.

  1. Download Puttygen.
  2. Load the .pem key to puttygen
  3. Save as Private key
  4. Use this key to login to ec2 instance

P.S : Also if the SSH ask for login/username - enter ubuntu or admin

Upvotes: 3

Ashutosh Singhal
Ashutosh Singhal

Reputation: 21

If you are using cloud service and trying to connect server using ssh then Don't login the user name as ec2-user, the default user name is ubuntu forubuntu server.

Upvotes: 2

CodeNode21
CodeNode21

Reputation: 31

If you've saved your public key on an external drive and it's not connected, putty will throw this error when connecting to your remote server.

Upvotes: 0

O.O
O.O

Reputation: 1298

It worked for me after I did the following steps :

1- Download Puttygen (https://www.puttygen.com/download-putty)

2- Open PUttyGen and then Load the private key from :

C:\Users[username]\Chapter6.vagrant\machines\default\virtualbox

3- save the new private key with a new name.

4- Open Putty, go to Connection > SSH > Auth > and add the new private key

5- Connect now using 127.0.0.1 and 2222

Upvotes: 9

Edit file

sudo vi /etc/ssh/sshd_config

Set PasswordAuthentication yes enter image description here

Then restart server

sudo service ssh restart
sudo service sshd restart

Upvotes: 16

Sarath Kumar
Sarath Kumar

Reputation: 733

1.Edit the /etc/ssh/sshd_config file. 2.Change PasswordAuthentication and ChallengeResponseAuthentication to yes. 3a. Restart ssh /etc/init.d/ssh restart. OR 3b. better you use service sshd restart

Upvotes: 0

Yue Hu
Yue Hu

Reputation: 9

Did you change folder permissions? i met this question in this week, so i find the error that is cause to me change the folder(name is ec2-user) permission.

Upvotes: 0

dylanninin
dylanninin

Reputation: 649

I think your private key file format is not compatible with putty for putty uses its' native format instead.

Detail:http://tartarus.org/~simon/putty-snapshots/htmldoc/Chapter10.html#errors-no-auth

Upvotes: 1

fourcube
fourcube

Reputation: 770

Do you still have access to the server (maybe an open shell?) Check /var/log/messages for more details. This could have something to do with your PAM configuration.

Upvotes: 0

Related Questions