1

I am facing the issue in connecting server via putty. The error is showing me is "Server Refused our key: AWS - Disconnected: No supported authentication methods available (server sent:publickey)".

I am logging in with username " ubuntu ".I checked lots of websites but I didn't find any solution. I create a new key-pair file( .pem ) and tried again that's also is not working. I am using the same key name for the pem file. Then using pem file I am creating a ppk file and then it is not working

9
  • Well did you add the key to the server configuration?
    – Seth
    Nov 3, 2017 at 12:27
  • Where did you create the new key-pair ? AWS will create a new one for you while spinning a new instance. Download it, convert it to ppk then use it with Putty Nov 3, 2017 at 14:07
  • @Algeriassic I did that but still, it's giving me error for the key "Server refused our key" Nov 6, 2017 at 5:55
  • @Seth where to add in server configuration, I created with the same name as i have used in instance Nov 6, 2017 at 5:56
  • It's not the name it's the actual key that is important.
    – Seth
    Nov 6, 2017 at 6:28

4 Answers 4

1

When we convert your .pem file to .ppk it creates a public and private key of it's own inside the .ppk file like this:

PuTTY-User-Key-File-2: ssh-rsa
Encryption: none
Comment: imported-openssh-key
Public-Lines: 6
AAAA***
***
***
***
...
Private-Lines: 14
AAA***
***
***
***
...
Private-MAC: ***

To connect to the server, you need to append the six lines of public key above into authorized_keys file in server user's /home/.ssh directory.

Note: Make sure the syntax is correct in authorized_keys file. For rsa keys it is like this:

ssh-rsa AAA***(whole public key in one line without pressing enter)***

0

i had the same problem, I decided to look at the public key for the root user, it had the following appearance "rsa-ssh YOUR KEY name of .pem file" in one line, the public key generated by the putty from .pem for the new user looked different: the comments and the key were written in about 6 lines when I edited the putty key as root and copied it in /nome/nevuser/.ssh/authorizade_key it work

0

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html#replacing-key-pair

You have an EC2 instance it looks like, follow the instructions above to create a key pair for this instance. A PEM file is a form of password that is shared by only those who have the files configured. You have to create this on the EC2 instance in Amazon, so the EC2 knows that those who connect with this file are authorized, and then download it to your own computer, and convert it to something Putty can use.

Then, determine what operating system your EC2 instance is using. Depending on what it is, you will use a different user, for example with Ubuntu, the user is ubuntu, or Amazon Linux, the user is ec2.

0

AWS – Disconnected : No supported authentication methods available (server sent :publickey) x

1.After uploading *pem file dont click on generate public or private key pair.

  1. Just click on save private key

3.Just upload this file in auth, this will solve above issue

Please on this link for further details https://computerlogics931.blogspot.com/2018/04/aws-disconnected-no-supported.html

1
  • Welcome to Super User! The link you included has no further details- did you mean that was the source of the above instructions?
    – bertieb
    Jun 14, 2018 at 16:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .