Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two instances in the same region using the same security group. I want to allow all the instances in this security group to shell into each other. I have added the security group to port 22 thinking that this is the way to do it, but it does not work. Attempts to shell between machines fail.

I want to use the SG because not all of the instances have EIPs so it's not practical to put IPs into the SG.

What am I missing?

share|improve this question
What rules do you have on that SG? You must have at least TCP 22 with the source as the SG ID. – user96522 Sep 30 '11 at 19:32
Yes. As I stated in my question I do have port 22 open to the security group. – jdw Oct 1 '11 at 14:55
up vote 3 down vote accepted

Turns out I was mostly correct. Adding the SG to itself is indeed the way to go, but once you do that you must use either the internal IP or the public DNS name to connect to it. Connecting through the public elastic IP will not work with only this rule in effect.

Good primer here:

share|improve this answer
Link is broken. Could you explain this more? – nu everest Mar 1 at 23:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.