[Openstack] Fail to ssh into trusty-server ubuntu cloud-image instance

Du Jun dj199008 at gmail.com
Wed Nov 19 08:55:29 UTC 2014


Hi all,

I launch an instance based on ubuntu cloud-image and head a problem:

"Permission denied (publickey)."

My work steps are:

1. download a ubuntu cloud-image(qcow2 file format):

$ wget
http://uec-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img

2. upload the image using glance client:

$ glance image-create --name trusty-server-cloudimg-amd64 --disk-format
qcow2 --container-format bare --is-public True --file
~/images/trusty-server-cloudimg-amd64-disk1.img

I can see the image details below:

vcap at ubuntu:~/.ssh$ glance image-show trusty-server-cloudimg-amd64
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | c6427f0b07535e843aa03a1367b1f3d9     |
| container_format | bare                                 |
| created_at       | 2014-11-19T07:31:23                  |
| deleted          | False                                |
| disk_format      | qcow2                                |
| id               | db872d0d-4fd5-4955-93fd-41df8fe0c8fa |
| is_public        | True                                 |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | trusty-server-cloudimg-amd64         |
| owner            | 9af1b4244f324b9d8ba42bffb9c3c9a8     |
| protected        | False                                |
| size             | 255918592                            |
| status           | active                               |
| updated_at       | 2014-11-19T07:31:26                  |
+------------------+--------------------------------------+

3. launch an instance basing on the image:

nova boot newServer --image db872d0d-4fd5-4955-93fd-41df8fe0c8fa --flavor 2

nova list

+--------------------------------------+-----------+--------+------------+-------------+--------------------+
| ID                                   | Name      | Status | Task State |
Power State | Networks           |
+--------------------------------------+-----------+--------+------------+-------------+--------------------+
| 261e4fec-dc96-429d-9239-65dfe3732eca | newServer | ACTIVE | -          |
Running     | private=10.254.1.3 |
+--------------------------------------+-----------+--------+------------+-------------+--------------------+

After configuring security group(all tcp 22 port):

vcap at ubuntu:~/.ssh$ telnet 10.254.1.3 22
Trying 10.254.1.3...
Connected to 10.254.1.3.
Escape character is '^]'.
SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2

vcap at ubuntu:~/.ssh$ ssh ubuntu at 10.254.1.3
Permission denied (publickey).

I guess the newServer is configured to be accessed via ssh key. But, I have
no idea what's the private key.

BTW, from the log of web console, I can see:

newserver login: Cloud-init v. 0.7.5 running 'modules:final' at Wed,
19 Nov 2014 08:09:02 +0000. Up 480.40 seconds.
ci-info: no authorized ssh keys fingerprints found for user ubuntu.
ci-info: no authorized ssh keys fingerprints found for user ubuntu.
ec2:
ec2: #############################################################
ec2: -----BEGIN SSH HOST KEY FINGERPRINTS-----
ec2: 1024 e5:46:98:ac:f1:a0:5d:2d:eb:2b:a5:c7:af:0d:3b:91  root at newserver (DSA)
ec2: 256 ed:37:dd:5a:c5:3e:94:1a:6d:6a:d7:f7:a6:3c:77:24  root at newserver (ECDSA)
ec2: 2048 12:21:cf:11:ee:fc:e5:40:97:1f:ed:f4:1b:79:69:f3  root at newserver (RSA)
ec2: -----END SSH HOST KEY FINGERPRINTS-----
ec2: #############################################################
-----BEGIN SSH HOST KEY KEYS-----
ecdsa-sha2-nistp256
AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHjWoLKvRYpqeetH9LwUikGPAX5gkVbGbvUcfEM5TpNG5A8PHyvsC+qcEaFvBj/TSO3CGpaEEHrnclA5tA8V9/A=
root at newserver
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC384S4T8GNLW88LbtQlTVACG6WWKl34wnlmU0FYU18hE/fL27GoXxi94hIZGzKg6oFJ420VUKPKOOzv/H51oNgqVKmHqf03v7ljzDp2gJ4pJrMI9+rxeQ5VCgcZ/C3VNPhh1rJc6jKDCWni3A+NOUkgD2oo1kruxc4rJmtQ4A4xCU22l8myg6/odMr7FAPUJT1N4BWjXwnglbfOJOjaQ5vWMNyIYBcmooEaGDmLeovSuX0N6k6Un2YccwhQ87vxNt3QCiu6cPR5ljEL4xXTUgUBVNRLqxSFqEDZy9Y5LrM6Fl5W/b0IaK8soHVacKuThW1d5IpXUknlSwTK7gG41ep
root at newserver
-----END SSH HOST KEY KEYS-----
Cloud-init v. 0.7.5 finished at Wed, 19 Nov 2014 08:09:08 +0000.
Datasource DataSourceConfigDriveNet [net,ver=2][source=/dev/sr0].  Up
486.38 seconds

 Any help will be appreciated, thanks!

--
Regards,
Frank
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20141119/c98982b1/attachment.html>


More information about the Openstack mailing list