Well...
In the end, I had to delete all my keys, upload them again and wait a half an hour more or less. I don't know what happened but now it works again.
Question
I don't know what is happening.
I have been able to connect to the server for a couple of days without problems and suddendly I got a frozen window using putty. After that, each time I try to connect, I receive this message:
disconnected: no supported authentication methods available (server sent: publickey, gssapi-with-mic)
I am using putty and puttyagent for private key. I already have uploaded the public key to the server and I was able to connect half an hour ago.
How can I check why it is failing? I haven't change the user or password or anything.
La solution 5
Well...
In the end, I had to delete all my keys, upload them again and wait a half an hour more or less. I don't know what happened but now it works again.
Autres conseils
I had the same issue after creating a Centos 7 vm using Vagrant. In the sshd_config file it said "PasswordAuthentication no". Changing that to "PasswordAuthentication yes" and a restart of sshd solved it for me.
I had a similar issue:
I was able to connect to EC2 via PowerShell successfully (with .pem file) so I realized that .ppk file was wrong.
Googled for about an hour and find that when you generate the .ppk with PuTTYgen for the first time you'll see the key comment filed something like "rsa-key-20191006" and what should be there is "imported-openssh-key".
After I loaded the same .pem file, as for the first time (but DID NOT CLICK on Generate) and clicked Save Private Key and used this private key for Auth, everything worked as expected.
I got the same error
disconnected: no supported authentication methods available (server sent: publickey, gssapi-with-mic)
while trying to connect to an AWS EC2 instance with ssh using a PPK. The issue I had and fixed was that when I used PuTTYKeyGenerator to convert from PEM to PPK, by default it uses PPK file version 3 which is not supported by AWS EC2 and when I tried to connect with mRemoteNG I got the error, then I tried directly with PuTTYNG I got PuTTY key format too new
:
To make it work, change in PuTTYKeyGenerator >> Key >> Parameters for saving key files >> PPK file version: 2
and then reconvert the PPK and should work.
In my case updating both putty and puttygen to the latest version (0.76) solved this issue.
I was getting this error because of wrong userid. As soon as I used ec2-user it worked. I was under the impression that my AWS account id is my userid. It seems ec2-user is by default the user, you should login with.
Copy the content in your pem file and create another pem file and paste the content. Sounds lame... but it works !!
Just go to Putty keygen and load an existing private key from your local path where vagrant box for centos is installed (example :- ...vagrant\machines\default\virtualbox\private_key) and then choose SSH-1 (RSA) option from below and lastly click on "Save Private Key" button and save that file in your desktop or any where. Then open putty fill the ip address of machine -> go to SSH --> Auth -->Browse and provide the same key you have saved in your desktop or anywhere and then click on open.
I have the same issue and this is only because of Windows Defender. Just Goto RANSOMWARE Protection and allow your Know App like Putty or MoBaExtreme etc.
After trying almost everything, this solved the issue for me: I downloaded the latest version of PuTTYgen (0.77) and loaded the private key (.ppk) file. I then proceeded to [Save Private Key] and saved it under a different name.
This resolved the issue for me.
I had the same issue while connecting to openshift Labs. Stopped working for a new server. I had to Upload public key to OPENTLC again and it worked with the Putty
In PuTTY, under Category on the left, navigate to Connection → SSH → Auth.
On the right under Authentication parameters, click Browse and locate the private key saved from PuttyGen
I faced the same error and this is what worked for me.
AWS Docs reference link: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html
I am using CPanel and I forgot to authorize the key so it kept giving me that error..then I had some caffeine and realized I needed to authorize. Problem solved!
Restarting the machine and re-installing FileZilla and then connecting again solved my issue.
This issue I could resolve by using .ppk file instead of .pem file.
The above worked for me.