I am new to AWS and not a networking expert but curious to know more about it.
I created a VPC with a public subnet only. Then i created an EC2 instance using an Ubuntu 14.04 64-bit pv AMI image (ami-e84d8480) as well generating
the key pair needed to connect to it through ssh.
I followed amazon's instructions to connect to an EC2 instance via ssh which did not work.
Here is my attempted input and debug log:
Running on
OS X 10.9.4
user$ ssh -vvv -i key.pem
[email protected]
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 102: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to xxx.xxx.xxx.xxx [xxx.xxx.xxx.xxx] port 22.
debug1: connect to address xxx.xxx.xxx.xxx port 22: Operation timed out
ssh: connect to host xxx.xxx.xxx.xxx port 22: Operation timed out
To attempt to resolve
the issue:
I enabled
the SSH port.
Tried different usernames other than ubuntu, like ec2-user and root.
Initially set an inbound ssh rule in
the security group to connect to only my ip address. When that did not work, i changed it to allow any ip to connect.
But those actions did not fix
the problem.
Here are my guesses as to what i am missing in getting
the EC2 instance connection to work.
My etc/ssh_config file may be preventing
the connection from taking place.
I may have missed an important networking detail when setting up
the VPC.
I do not have a public ip address specified for
the instance. I am connecting through
the private ip address.
My questions for
the community:
Am i going about it
the wrong way connecting to
the instance through
the private ip address? if so, do i need to specify a public ip address for it to connect or some other method?