PawelRoman
PawelRoman

Reputation: 6282

AWS EC2 Connection refused after attaching a volume

I have two EC2 instances: A and B. I have SSH access to both using the same private key.

I want make B a clone of A in terms of disk content. So I make snapshot of a volume of instance A, and create a new volume from the snapshot.

Then I detach a volume of instance B and attach the previously created volume (copy of A volume). I use identical root volume names.

Now both A and B have volumes which are identical copies. I Start B instance, it starts without errors.

I try SSH connecting to A - it still works (nothing changed here) I try SSH connecting to B - I'm getting "ssh: connect to host XXX.XXX.XXX.XXX port 22: Connection refused".

It looks like it's not even trying my key, it's just refuses connection outright. But I have not changed any firewall rules on B. I just cloned the volume, because I wanted instances A and B have identical disk content.

What is happening and why can't I connect to B?

Upvotes: 0

Views: 906

Answers (1)

PawelRoman
PawelRoman

Reputation: 6282

WTF! When I used -vvv it actually prompted about adding machine to trusted hosts, and after "yes" it connected normally.

But without -vvv that prompt never appeared, and ssh client just hanged there doing nothing until it timed out.

What the hell? Is it a bug in ssh client?

Upvotes: 1

Related Questions