PDA

View Full Version : ssh access to cloud foundry instances?



tednaleid
Aug 30th, 2009, 10:25 PM
I'm trying to ssh to the cloud foundry created image, but haven't been able to get in. Am I just being dumb or is it disabled somehow?

I've got the security group opened up in the amazon setup and I can successfully telnet to port 22 on my box.

When I try to ssh in as root and using the key pair that I gave to the cloud foundry setup, it just times out. I've also tried using the username "deploy" which I've seen in use in some AMIs rather than root.

Is there some other user account that I should be using?

dvolk
Aug 30th, 2009, 10:59 PM
You should use root to ssh into the instance. Sample command:


ssh -i /path/to/your/keypair.pem root@yourinstanceipaddress


One potential source of confusion - you should you the keypair you've created via ElasticFox or AWS Management Console, not the certificate you can create on AWS "Your Account" page.

tednaleid
Aug 30th, 2009, 11:16 PM
Doh, I was doing something stupid.

I was doing exactly what you suggested (actually just right clicking on the image in elastifox and choosing "connect to instance" to have it launch Terminal.app with a command just like what you have.

I had forgotten that I'm running ssh on a non-standard port on the machine I'm connecting from, and that causes all of my outgoing ssh connections to also default to that non-standard port. Adding an explicit "-p 22" on the end of my ssh command fixed it. The "root" user is set up and I'm in now. I'll just change my ~/.ssh/config file to default my connections to this to port 22.