ssh Authentication succeeded (publickey). Coonection closed by remote host

0

Not able to login to amazon Linux in AWS

Hi, I am not able to login to amazon linux, even after successful authentication. The verbose of ssh is attached as picture.

Arnab Biswas

Posted 2019-04-22T08:17:41.363

Reputation: 1

I am able to connect to a ubuntu machine on the same subnet. But not this machine. I was able to connect the machines till saturday. But today I am not able to connect this machine. Please suggest. The machine is running Amazon Linux – Arnab Biswas – 2019-04-22T09:16:09.760

Answers

0

The problem you see is most likely a misconfiguration of the security group attached to the instance.

The instance can accept SSH traffic on port 22, but since it closes the connection immediately after connecting, it most likely cannot return traffic - your outbound rules do not permit that.

Try configuring the following outbound rule (the default one) for the security group attached to the instance:

type: All traffic, Protocol: All, Ports: All, Destination: 0.0.0.0/0

Fanatique

Posted 2019-04-22T08:17:41.363

Reputation: 3 475

This answer is wrong. From the provided output it is clear that traffic is traversing fine in both directions. This is not a firewall/security group issue. – davidgo – 2019-04-22T08:42:18.800

Hi Fanatique, I am able to connect to a ubuntu machine on the same subnet. But not this machine. The configuration is all same as you have mentioned. I was able to connect the machines till saturday. But today I am not able to connect the machines. Please suggest. – Arnab Biswas – 2019-04-22T09:12:53.553