LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   SSH to Amazon EC2 (https://www.linuxquestions.org/questions/linux-security-4/ssh-to-amazon-ec2-893132/)

Arlc 07-22-2011 06:50 AM

SSH to Amazon EC2
 
I am wondering if anyone has any experience with SSHing to Amazon's EC2 site. Has anybody used this site and have any opinions on the reliability, security and real world usefulness of this site for running a cloud?

SSH] Server Version OpenSSH_5.3
[SSH] FAIL: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).


[SSH] INFO: DISCONNECT

I get the above when I try to ZOC to an EC2 instance. I generated the key pair when the instance was created and appears to be a valid key. I am trying to do this from a windows7 box. I also tried using puTTY and got a similar result. Using puTTY Amazon says you have to convert .pem --> .ppk using puTTYgen and save the new resulting private key and use this not the .pem file for initiating the SSH session.

From puTTY
Server refused our key
Access denied.

No supported authentication method available(server sent:
publickey.gssapi-with-mic)

Any help or information on Amazon EC2 appreciated. Thanks

hyperhead 07-22-2011 04:42 PM

Worked fine for me in XP when I converted my private key pem. Did you File > Save Private key in Putty, then use that in SSH > Auth > Authentication parameters > Private key file for Authentication?

I use Amazon EC2 CentOS Micro instance for running irssi and use keys to ssh back to my Linux machine to enable notify-send. That way I can always be on IRC 24/7 whatever PC / phone I am on.

Arlc 07-22-2011 05:47 PM

ssh to ec2
 
Yes, did that. That's why I tried ZOC because I thought the problem might have been the .pem ---> .ppk conversion.
I'm thinking now that the machine image I created, a 64 bit Red hat version may not be configured with the ssl libraries in it. Where do you find the index of what capabilities, libraries and includes are in an image?
There must a keycode to decipher the image names somewhere.
Thinking about blowing this image away and loading an ubuntu image, but I want to decipher the image name thing first.

sneakyimp 07-22-2011 07:41 PM

I've been using EC2 for a couple of projects now and I'm able to login via ssh to my Ubuntu compute instances just fine via key authentication from Mac/Windows/Ubuntu. There are a few things to remember:
* VERY IMPORTANT: set up your Amazon Security Groups to permit inbound SSH connects on port 22. If you forget this step, the default configuration is to block all inbound connections.
* For an ubuntu image, you log in as user "ubuntu" using the certificate. If you try to login as root, you get a message instructing you to login as ubuntu instead.
* Remember to specify your private key when you try to ssh in. On windows, when using puTTY, you have to get puttyGen and convert the PEM file to the PPK format. I would encourage you to revisit this step, make sure you are using the private key, not the public one, and make sure you are exporting the right type of file to the right place and also remembering to browse for this file in puTTY when setting up your connection.
* As for Red Hat images, MAKE SURE YOU USE AN OFFICIAL IMAGE. If you are just grabbing one out of the community AMIs you have no idea if the machine might be compromised or not. Red Hat made an announcement some time ago about there official cloud offerings.


All times are GMT -5. The time now is 11:43 PM.