I don't know what is happening.

I have been able to tướng connect to tướng 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 tướng 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 tướng the server and I was able to tướng connect half an hour ago.

How can I kiểm tra why it is failing? I haven't change the user or password or anything.

asked Mar 4, năm trước at 9:36

2

I had the same issue after creating a Centos 7 vm using Vagrant. In the sshd_config tệp tin it said "PasswordAuthentication no". Changing that to tướng "PasswordAuthentication yes" and a restart of sshd solved it for má.

answered Jul 29, 2017 at 6:27

I had a similar issue:

  • in putty console, I got the message saying "Server refused our key"
  • windows error message was: "PuTTY Fatal Error" - "No supported authentication methods available (server sent: public key,gssapi-keyex,gssapi-with-mic)"

I was able to tướng connect to tướng EC2 via PowerShell successfully (with .pem file) sánh I realized that .ppk tệp tin 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 lượt thích "rsa-key-20191006" and what should be there is "imported-openssh-key".

After I loaded the same .pem tệp tin, 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.

answered Oct 6, 2019 at 15:45

1

In my case updating both putty and puttygen to tướng the latest version (0.76) solved this issue.

  1. Download latest putty and latest puttygen from https://www.puttygen.com/#Download_PuTTYgen_on_Windows
  2. In puttygen click Load, chose All Files and select your PEM tệp tin for your EC2 instance.
  3. Choose SSH-1 (RSA) as a type of key to tướng generate.
  4. Click on Save private key.
  5. In putty in the Auth section click on browse and select your generated private key.

answered Feb 11, 2022 at 9:52

I got the same error disconnected: no supported authentication methods available (server sent: publickey, gssapi-with-mic) while trying to tướng connect to tướng an AWS EC2 instance with ssh using a PPK. The issue I had and fixed was that when I used PuTTYKeyGenerator to tướng convert from PEM to tướng PPK, by mặc định it uses PPK tệp tin version 3 which is not supported by AWS EC2 and when I tried to tướng 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 tệp tin version: 2 and then reconvert the PPK and should work.

answered Sep 15, 2021 at 14:26

3

Well...

In the kết thúc, I had to tướng 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.

answered Jun 2, năm trước at 10:47

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 tài khoản id is my userid. It seems ec2-user is by mặc định the user, you should login with.

answered Feb 26, 2020 at 17:52

Copy the nội dung in your pem tệp tin and create another pem tệp tin and paste the nội dung. Sounds lame... but it works !!

answered May 8, 2019 at 13:52

Just go to tướng 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 tệp tin in your desktop or any where. Then open putty fill the ip address of machine -> go to tướng SSH --> Auth -->Browse and provide the same key you have saved in your desktop or anywhere and then click on open.

answered May 27, 2021 at 12:16

I have the same issue and this is only because of Windows Defender. Just Goto RANSOMWARE Protection and allow your Know App lượt thích Putty or MoBaExtreme etc.

answered Apr 22, 2020 at 5:44

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) tệp tin. I then proceeded to tướng [Save Private Key] and saved it under a different name.

This resolved the issue for má.

answered Aug 31, 2022 at 9:58

In my case only upgrading the putty version solved the issue. I was using 0.72 version. I downloaded the 0.79 installed from here. Ran the installer. It upgraded the version of the existing installation. It retained all my saved sessions and configurations. The same configuration that was not working earlier, started working after the upgrade, without any changes.

answered Sep 18, 2023 at 7:23

I had the same issue while connecting to tướng openshift Labs. Stopped working for a new server. I had to tướng Upload public key to tướng OPENTLC again and it worked with the Putty

In PuTTY, under Category on the left, navigate to tướng Connection → SSH → Auth.

On the right under Authentication parameters, click Browse and locate the private key saved from PuttyGen

answered Oct 31, 2019 at 17:31

I faced the same error and this is what worked for má.

  • In the Category pane, expand Connection, expand SSH, and then choose Auth.
  • Complete the following: Choose Browse. Select the .ppk tệp tin that you generated for your key pair and choose Open.

AWS Docs reference link: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/putty.html

answered Dec 29, 2021 at 16:57

I am using CPanel and I forgot to tướng authorize the key sánh it kept giving má that error..then I had some caffeine and realized I needed to tướng authorize. Problem solved!

answered Jul 6, 2022 at 12:08

I found 2 solutions for má. Either one of them works.

  1. Updating Filezilla from 3.52 to tướng 3.66
  2. Using the right format in ppk key tệp tin.

Just to tướng add my scenario in case it helps someone, I was having trouble connecting to tướng a newly span up ec2 aws linux 2 instance and getting this exact error: "No supported authentication methods available (server sent: gssapi-keyex,gssapi-with-mic)" and ssh was configured correctly and keys were working on other instances. Could connect when I enabled password authentication.

After much searching and testing the issue was we are using a Directory as a Service provider called Jumpcloud and their mặc định registration of machines changed sánh that "Enable Publik Key Authentication" was now unticked by mặc định, despite it being enabled in ssh_config.

If you are using filezilla and facing this issue, Please install latest version of filezilla. It resolves the issue.

I'm using CentOS Stream 9. As soon as I created the linux box at DigitalOcean.com I couldn´t login usin putty. So using the console of the droplet I modified tệp tin 50-cloud-init.conf located in directory /etc/ssh/sshd_config.d with the below content:

    PasswordAuthentication yes
    PermitRootLogin yes

the restarted the sshd service an worked nice !!!

1

I have the same error, with an Oracle Cloud box. It happens only from my work máy vi tính. No issues connecting from the PC. Both on same trang chủ LAN. I tried everything in this thread and ran out of ideas.

Wireshark did not help má as client-server connect just fine, start exchanging new DH keys, then putty sends an ACK FIN and then an out-of-order segment. And then all stops. Not sure why, as the handshake and key exchange segments seem just fine.

Restarting the machine and re-installing FileZilla and then connecting again solved my issue.

answered Nov 16, 2021 at 14:42

1

This issue I could resolve by using .ppk tệp tin instead of .pem tệp tin.

The above worked for má.

Yunnosch

26.6k9 gold badges44 silver badges61 bronze badges

answered Mar 8, 2021 at 12:12

4