简体   繁体   中英

Unable to connect to amazon ec2 ubuntu instance via ssh using elastic ip

At first, I was able to connect using ssh. After some time the connection got closed and since then I am not able to connect. Below is the debug log. what I can see is the connection is established but again broked.

I have tried rebooting, starting and stopping the server but nothing is working for me. Please help.

username:coding my.name$ ssh -i "aws_ubuntu_16.pem" ubuntu@xx.xx.xx.xx -vv
OpenSSH_7.7p1, LibreSSL 2.7.3
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 48: Applying options for *
debug2: resolve_canonicalize: hostname xx.xx.xx.xx is address
debug2: ssh_connect_direct: needpriv 0
debug1: Connecting to xx.xx.xx.xx [xx.xx.xx.xx] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file aws_ubuntu_16.pem type -1
debug1: key_load_public: No such file or directory
debug1: identity file aws_ubuntu_16.pem-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.7
ssh_exchange_identification: read: Connection reset by peer
  • Approach 1: The most likely to be possible reason for this issue is that your IP must have been blacklisted. Could you please check if your Elastic IP is blacklisted. If yes, whitelist it and try to ssh again. You can use ' spamhaus.org ' for checking the blacklisted IP and whitelisting it again.
  • Approach 2: Not recommended, but you can try changing the Elastic IP if the issue still persists.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM