Reputation: 1573
Several months ago, my friend decided to stop one of his instances. Before stopping it, he created an image of its used to launch it again in the future.
Today, I launch the new instance again from that image, but I cannot ssh into that new instance while I can still ssh into the his old instance. I use the same key pair and security group as the old instance.
The error is: ssh: connect to host xxx.xxx.xxx.xxx port 22: Connection refused
What are the possible causes and how can I fix them?
Upvotes: 0
Views: 59
Reputation: 25
You can resolve the issue by adjusting the permissions of "/var/empty/sshd":
chown root:root /var/empty/sshd
chmod 711 /var/empty/sshd
If it does not solve your issue please share the output of telnet.
Upvotes: 0
Reputation: 6765
Connection refused indicates a network failure when trying to ssh. You shuold make sure your server contains a security group allowing your IP to connect to the server via port 22.
Upvotes: 2