Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am exploring Amazon EC2.

I created a Linux SUSE instance etc. now I am trying to remote into it from my mac using a VNC client (Chicken of the VNC client): I have the public dns of the instance but I obviously need a password to do so.

I understand I can generate it somehow from my key pair - HOW?

share|improve this question
    
Also, make sure your Security Group for the EC2 instance has the correct ports open to allow VNC, if you are going that route. And that VNC is installed and running, for that matter :) –  Rob Jun 15 '11 at 16:32
    
I was under the impression that VNC server comes with SUSE -- I'll probably have to start it either way ... that's probably gonna be another question :) –  JohnIdol Jun 15 '11 at 17:19

2 Answers 2

up vote 4 down vote accepted

All you need is the private part of your keypair. If you didn't set a password when creating the keypair, you don't need to enter one when connecting to your instance.

You just need to use the private key when connecting via ssh.

On the command-line:

ssh -i privatekey.pem user@myserver.example.com

If you're using a GUI like Putty, assign the keyfile before connecting, in:

Connection | SSH | Auth | Private key file...
share|improve this answer
3  
add to the above. for putty you need to use puttygen (also available on the putty site) to convert the private key .pem file to something.ppk –  Vangel Jun 15 '11 at 7:26
    
thanks I was using an existing keypair and didn't know where the private key was - just created another one and I have they pem file now. –  JohnIdol Jun 15 '11 at 17:21
    
Just so you know, JohnIdol, the private key is never kept by amazon. You can download it once, when it is created, and if you lose it after this or don't download it then you must delete the keypair and generate a new one. –  Michael Lowman Jun 15 '11 at 17:39
    
Yeah I get that now thanks - I was confused because I was using an existing keypar and I didnt have the pvt key anymore! –  JohnIdol Jun 16 '11 at 9:18

By default when you spin up EC2 box you have to connect via SSH Keys. The "Key Pair Name" you defined spinning up your sever define the SSH key you need to use to connect to the server initially.

Unless you defined installing VNC and starting it up in your user script when you created the server you will need to log in via SSH and install VNC.

If you are on OSX you can open a terminal and run the command

ssh -i /path/to/amazon/key/pair.pem username@ec2.public.dns.address

I haven't spun up a SUSE box yet but if you don't know the username you can try root.

share|improve this answer
    
thanks for helping - I was under the impression Linux SUSE came with a VNC server? I will probably have to start it either way –  JohnIdol Jun 15 '11 at 17:22
    
Ah it very well might. I should have been clearer I have not worked with the SUSE images. Anyways, looks like you got the answer you were looking for. –  Shocm Jun 15 '11 at 21:27
    
your answer was good to (+1'd) - but the other one came first :) –  JohnIdol Jun 16 '11 at 9:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.