PDA

View Full Version : [ubuntu] No ssh keys installed in instances



obast
October 11th, 2010, 09:29 PM
While I can start instances in my UEC install, I can't do anything with them.

After some poking around and with the help of ssh -v, I've figured out that the problem is that the ssh-keys aren't getting installed.

What I don't know is how to fix that!

I've tried deleting my old key-pair and making a new one, but that didn't help.

Any suggestions?

I suspect that part of the problem might be running both the cloud controller and the node controller on the same machine. I already found that I had to remove the node, then re-register it to get it to show up.

Rusty au Lait
October 11th, 2010, 10:58 PM
I found out the hard way that every time you restart an instance it recreates the ssh key pair (not your mykey.priv). The one I created the first time I sshed in using ssh -i ~/.euca/mykey.priv ubuntu@ip_of_insidence is still in my .ssh/known_hosts file (the one for all ssh public keys based on the ip address). When I restart an instance (or when I used the same IP address for some other ssh keyed access) the login fails because it is now the wrong ssh public key. The error returned from a failed login shows the line number in the known_hosts file. I edit known_hosts and delete the offending line. All is well.
Is this your problem?
ElasticFox and HybridFox do not tell you this when you click on the button to log into the instance, they just fail without explanation.

obast
October 11th, 2010, 11:23 PM
No, it never gets to the key negotiation at all, it fails early. So there are no ssh keys period.

kim0
October 12th, 2010, 04:31 PM
If you don't get a reply here, you can try the ubuntu-cloud mailing list too
https://lists.ubuntu.com/mailman/listinfo/Ubuntu-cloud