Reputation: 5730
I don't know what's wrong with it. Here is a screenshot.
(first image is what i've done in terminal to log in my EC2 server second image is what i've set in "System preference --> sharing --> remote login)
Yosemite is my OS. Please help me,
Upvotes: 1
Views: 336
Reputation: 339
You've got the right command for an ubuntu server. Check to make sure that security groups are configured and that you don't have Network Access Control Lists configured on your VPC. The configuration you made to the settings of your laptop are to open it up for people to log into your laptop, they don't do anything to facilitate you connecting out.
Upvotes: 1
Reputation: 11
Assuming that you have the right key file, you could be running into some security settings issues. Check your security group and make sure that the server is accepting connections on port 22 from all addresses. Also, I generally use the IP address when SSHing into an EC2 box instead of a url, as it is much shorter and more concise. Also, make sure that your server is running Ubuntu. I know that different OS's on EC2 use different default usernames. Your default username can be found at this page: http://alestic.com/2014/01/ec2-ssh-username
In the end, your ssh command should be something like ssh -i otkey.pem [username for your os]@[ip of your box]
Hope this helps!
Upvotes: 1