Matthew Hailwood Posted July 1, 2021 Share Posted July 1, 2021 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 More sharing options...
0 Cem K1l1 Posted July 1, 2021 Share Posted July 1, 2021 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 More sharing options...
0 Murat Eminoglu Posted July 1, 2021 Share Posted July 1, 2021 Hi Matthew, The ssh user is "ubuntu". If you need any help, please don't hesitate to contact us. Regards. Link to comment Share on other sites More sharing options...
0 Matthew Hailwood Posted July 1, 2021 Author Share Posted July 1, 2021 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). Link to comment Share on other sites More sharing options...
0 Murat Eminoglu Posted July 2, 2021 Share Posted July 2, 2021 Hi, This is usually caused by inadvertently offering multiple ssh keys to the server. Please try as follows. ssh -o IdentitiesOnly=yes -i ~/.ssh/web-production ubuntu@ip_address Regards. Link to comment Share on other sites More sharing options...
Question
Matthew Hailwood
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.
Link to comment
Share on other sites
Top Posters For This Question
2
2
1
Popular Days
Jul 1
4
Jul 2
1
Top Posters For This Question
Murat Eminoglu 2 posts
Matthew Hailwood 2 posts
Cem K1l1 1 post
Popular Days
Jul 1 2021
4 posts
Jul 2 2021
1 post
Posted Images
4 answers to this question
Recommended Posts