6

I spun up a new instance using this AMI:
099720109477/ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64-server-20220420

However, whenever I try to connect using putty I am prompted for a username. I enter "ubuntu" but I'm then disconnected with the message "Server refused our key" (see attached screenshot).

When I do everything the same using the 20.04 ami it works.

Working AMI from here:
099720109477/ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20220419

The working version is exactly the same. Same EC2 settings (network settings, security group, keypair, etc) and same putty settings (just a different IP address).

I've tried everything I can think of, but cannot find a way to connect to the new 22.04 instance.

Do I simply have the wrong username (i.e. is it something other than "ubuntu")?

halfer
  • 19,824
  • 17
  • 99
  • 186
caponica
  • 3,788
  • 4
  • 32
  • 48

2 Answers2

17

(Solution posted on behalf of the question author, to move it to the answer section).

It turns out that the problem was just that I needed to upgrade to putty-0.77. The error message was sending me in the wrong direction.

halfer
  • 19,824
  • 17
  • 99
  • 186
3

Since the AMI is public, I actually launched the AMI in my environment, and it all worked perfectly. I was able to login with the 'ubuntu' user.

The username for instances launched from this AMI is definitely 'ubuntu'.

My best guess is that your key is wrong, or, if your client environment is Unix/Linux, perhaps permissions on the key are wrong? (i.e. chmod 400 filename.pem)

halfer
  • 19,824
  • 17
  • 99
  • 186
Mark J. Bobak
  • 13,720
  • 6
  • 39
  • 67
  • 3
    It turns out that the problem was just that I needed to upgrade to putty-0.77 – caponica Jun 07 '22 at 14:34
  • 1
    Thank you very much. In my case I was trying ec2-user but was getting same error as OP. I tried ubuntu and it worked like charm. Informing here so that any other person in future can get benefit. – Amar Sep 28 '22 at 11:46