Jump to content
  • 0

What's the ssh user for the AWS Marketplace images?


Matthew Hailwood
 Share

Question

I don't seem to be able to ssh into the ec2 instances, I believe the user is wrong.

I selected the key I use for other ec2 instances and I can ssh into those fine.

I've tried the user 'ubuntu', 'ec2-user', and 'root' but none of them have worked,
so can anyone share which user we should be using?
Link to comment
Share on other sites

  • Answers 4
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

Posted Images

4 answers to this question

Recommended Posts

  • 0

Hi, 

What is the exact error that you get? I believe 'ubuntu' or 'root' should be ok so maybe some other thing is wrong. Also, I will check and ask to the team if the username for AWS AMI is changed.

Regards,
Cem

 

Link to comment
Share on other sites

  • 0

The exact error is 'Received disconnect from 13.54.xx.xxx port 22:2: Too many authentication failures'

Noting that my key is web-production, below is the ssh log

$ ssh ubuntu@13.54.xx.xxx -i ~/.ssh/web-production
OpenSSH_8.4p1 Ubuntu-5ubuntu1, OpenSSL 1.1.1j  16 Feb 2021
debug1: Reading configuration data /home/matthew/.ssh/config
debug1: /home/matthew/.ssh/config line 4: Applying options for 13.54.xx.xxx
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to 13.54.xx.xxx [13.54.xx.xxx] port 22.
debug1: Connection established.
debug1: identity file /home/matthew/.ssh/web-production type 0
debug1: identity file /home/matthew/.ssh/web-production-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.4p1 Ubuntu-5ubuntu1
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6p1 Ubuntu-4ubuntu0.3
debug1: match: OpenSSH_7.6p1 Ubuntu-4ubuntu0.3 pat OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.4*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7* compat 0x04000002
debug1: Authenticating to 13.54.34.133:22 as 'ubuntu'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:0pk2VZSb3H4abvsS/LTG4vyaF8KM2PbkaB7HMhpGy7A
debug1: Host '13.54.34.133' is known and matches the ECDSA host key.
debug1: Found key in /home/matthew/.ssh/known_hosts:94
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 134217728 blocks
debug1: Will attempt key: /home/matthew/.ssh/web-production RSA SHA256:Op/wgEF1zor+IFfCYcu7XnRicsgYwlRmBXb5g5WgBac explicit agent
debug1: Will attempt key: /home/matthew/.ssh/id_rsa RSA SHA256:7LHqJxm2iEr7/A4LnbS/8/5lVfUpddjChlTCyEk5ZB4 agent
debug1: Will attempt key: ... (5 more keys)
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /home/matthew/.ssh/web-production RSA SHA256:Op/wgEF1zor+IFfCYcu7XnRicsgYwlRmBXb5g5WgBac explicit agent
debug1: Authentications that can continue: publickey
debug1: Offering public key: /home/matthew/.ssh/id_rsa RSA SHA256:7LHqJxm2iEr7/A4LnbS/8/5lVfUpddjChlTCyEk5ZB4 agent
debug1: Authentications that can continue: publickey
... 5 more keys
Received disconnect from 13.54.xxx.xxx port 22:2: Too many authentication failures
Disconnected from 13.54.xx.xxx port 22

These are the security rules associated with the ec2

I even created a brand new keypair and booted an instance using that key with the same result (yes I applied chmod 600 to the key).

 

 

LNFPs5x.png.5a5813bccfcbb3ffafdc51559b74371c.png

Link to comment
Share on other sites

 Share


×
×
  • Create New...