Home > database >  What's the default user name to log into a new Ubuntu 22.04 LTS instance? (AWS EC2 created from
What's the default user name to log into a new Ubuntu 22.04 LTS instance? (AWS EC2 created from

Time:06-08

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")?

EDIT: 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.

CodePudding user response:

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)

Hope that helps.

  • Related