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?
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: http://support.rightscale.com/12-Guides/Dashboard_Users_Guide/Clouds/AWS_Region/EC2_Security_Groups/Concepts/About_EC2_Security_Groups#Access_Permissions