Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Amazon EC2 SSH server sent: ( publickey, gssapi-keyex,gssapi-with-mic)

Tags:

ssh

amazon-ec2

I get this error message when trying to connect with ssh.

Disconnected: No supported authentication methods available (server sent: publickey,gssapi-keyex,gssapi-with-mic)

I create a instances(cent os), generated my webserver.pem, puttygen imported that and output a ppk

I have seen that it may be a permissions issue with the ~/.ssh on the server but how can i change the permissions on the server without ssh access to the server? Is there another way to connect that i am not aware of? I am quite new to the amazon ec2 stuff.

I am on a windows system right now using putty.

like image 201
rubio Avatar asked Jan 26 '26 10:01

rubio


1 Answers

The below steps worked for me.

  1. Edit sshd_config file sudo vi /etc/ssh/sshd_config.
  2. Search for PasswordAuthentication
  3. If it is no, change it to yes. For me it was commented. If so, uncomment it.
  4. Restart sshd service sudo systemctl restart sshd.service

Done.

like image 116
I'm nidhin Avatar answered Jan 29 '26 03:01

I'm nidhin



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!