Reputation: 411
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
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
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
Upvotes: 0
Reputation: 11017
if you are using windows try enabling TIS and interactive keyboard under 'auth'
Upvotes: 0
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.
Upvotes: 1
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:
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
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
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
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
Reputation: 2098
In my case, I updated the Putty application to the latest and issue was solved.
Upvotes: 27
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
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
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
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
Reputation: 517
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
Reputation: 51
Solved via Puttygen
I was on a windows system and it doesnt support direct shell access like linux or macOS.
P.S : Also if the SSH ask for login/username - enter ubuntu or admin
Upvotes: 3
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
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
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
Reputation: 625
Edit file
sudo vi /etc/ssh/sshd_config
Set PasswordAuthentication yes
Then restart server
sudo service ssh restart
sudo service sshd restart
Upvotes: 16
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
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
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
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