← Back to team overview

openstack team mailing list archive

Re: Can't ssh into instance

 

On Fri, 25 May 2012, Anton Haldin wrote:

> Thank you very much guys  Sébastien and Leander
>
> It was very interesting case.
>
> I thought if I see this lines in compute.log then sshkey  injection was
> successfully

Given functional metadata service,
ssh key injection from the host is not necessary for ubuntu images.

>
> And I was sure I have few vms  with metadata server access issue and
> without ssh connection issue .

Ubuntu cloud images do not have any ssh HostKey generated inside them
(/etc/ssh/ssh_host_{ecdsa,dsa,rsa}_key). The keys are generated by
cloud-init after it finds a metadata service.  Without a metadata service,
they do not get generated.  ssh will drop your connections immediately
without HostKeys.

This is arguably a bug, and there is an open bug to have the keys
generated independent of ability to find a metadata service
(http://pad.lv/906669).

> It looks like I need some additional tests and need more time for code
> reading : - )

Fix the metadata issue, you're going to want it.

Alternatively, use configdrive
(http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/doc/configdrive/README)

Follow ups

References