0

I'm kind of new to bash programming, but I decided to take an online class in which we create a t1 micro instance through AWS and ssh in and do all of our work there. I had been sshing through an alias I had made just fine for about a month, then I took a short hiatus for about two weeks. When I came back I got the permission denied(public access) message. I have looked at other threads and gone into my .ssh files and compared files and the like. It might have something to do with the fact that I generated new key pairs on the t1 micro instance, but I don't know how to fix it. When I debug with ssh -v key.pem I get:

OpenSSH_5.2p1, OpenSSL 0.9.8x 10 May 2012
debug1: Reading configuration data /Users/myName/.ssh/config
debug1: Reading configuration data /etc/ssh_config
ssh: Could not resolve hostname key.pem: nodename nor servname provided,      
or not known

It's clearly an issue with one of the systems not recognizing the key pair, but I can't resolve it. Thanks everyone, all comments welcome.

Wold
  • 952
  • 1
  • 13
  • 25

1 Answers1

0

the problem is your ssh command

what you want to run is

ssh -i key.pem [user]@[servername]

Mehul Rathod
  • 1,244
  • 8
  • 7
  • thats part of the alias I created, it runs ssh -i key.pem + ubuntu@ec2.amazon.com, so I don't think it has to do with that aspect of it. `Host alias Hostname ec2-.compute.amazonaws.com User ubuntu IdentityFile "~/.ssh/key.pem" ` – Wold Aug 20 '13 at 08:32
  • My observation was based on the last line of the message .... ssh: Could not resolve hostname key.pem: nodename nor servname provided, or not known – Mehul Rathod Aug 20 '13 at 17:08
  • Alright, I'll keep researching, but thank you for your help. I think I may just end up regenerating a new key pair and seeing if that resolves the issue. – Wold Aug 21 '13 at 20:04