<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Du,<br>
    <br>
    <br>
    You have to create a keypair (ssh-keygen -t rsa) then upload the
    public key to nova. Then, use "ssh -i private.key" to log in.<br>
    <br>
    hope this helps,<br>
    <br>
    cheers,<br>
    <br>
    michaël<br>
    <br>
    <br>
    <div class="moz-cite-prefix">Le 19/11/14 09:55, Du Jun a écrit :<br>
    </div>
    <blockquote
cite="mid:CABvddo6DCf+_7UpJe34y36SSWFJnr9L5+_Y2dM5SRx9v0b8+pQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>Hi all,<br>
                    <br>
                  </div>
                  I launch an instance based on ubuntu cloud-image and
                  head a problem:<br>
                  <br>
                  <span style="color:rgb(255,0,0)">"Permission denied
                    (publickey)."</span><br>
                  <br>
                </div>
                My work steps are:<br>
                <br>
              </div>
              1. download a ubuntu cloud-image(qcow2 file format):<br>
              <br>
              $ wget <a moz-do-not-send="true"
href="http://uec-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img">http://uec-images.ubuntu.com/trusty/current/trusty-server-cloudimg-amd64-disk1.img</a><br>
              <br>
            </div>
            2. upload the image using glance client:<br>
            <br>
            $ 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<br>
            <br>
          </div>
          I can see the image details below:<br>
          <br>
          <a class="moz-txt-link-abbreviated" href="mailto:vcap@ubuntu:~/.ssh$">vcap@ubuntu:~/.ssh$</a> glance image-show
          trusty-server-cloudimg-amd64<br>
          +------------------+--------------------------------------+<br>
          | Property         | Value                                |<br>
          +------------------+--------------------------------------+<br>
          | checksum         | c6427f0b07535e843aa03a1367b1f3d9     |<br>
          | container_format | bare                                 |<br>
          | created_at       | 2014-11-19T07:31:23                  |<br>
          | deleted          | False                                |<br>
          | disk_format      | qcow2                                |<br>
          | id               | db872d0d-4fd5-4955-93fd-41df8fe0c8fa |<br>
          | is_public        | True                                 |<br>
          | min_disk         | 0                                    |<br>
          | min_ram          | 0                                    |<br>
          | name             | trusty-server-cloudimg-amd64         |<br>
          | owner            | 9af1b4244f324b9d8ba42bffb9c3c9a8     |<br>
          | protected        | False                                |<br>
          | size             | 255918592                            |<br>
          | status           | active                               |<br>
          | updated_at       | 2014-11-19T07:31:26                  |<br>
          +------------------+--------------------------------------+<br>
          <br>
        </div>
        3. launch an instance basing on the image:<br>
        <div><br>
          nova boot newServer --image
          db872d0d-4fd5-4955-93fd-41df8fe0c8fa --flavor 2<br>
          <br>
        </div>
        <div>nova list<br>
        </div>
        <div><br>
+--------------------------------------+-----------+--------+------------+-------------+--------------------+<br>
          | ID                                   | Name      | Status |
          Task State | Power State | Networks           |<br>
+--------------------------------------+-----------+--------+------------+-------------+--------------------+<br>
          | 261e4fec-dc96-429d-9239-65dfe3732eca | newServer | ACTIVE |
          -          | Running     | private=10.254.1.3 |<br>
+--------------------------------------+-----------+--------+------------+-------------+--------------------+<br>
          <br>
          After configuring security group(all tcp 22 port):<br>
          <br>
          <a class="moz-txt-link-abbreviated" href="mailto:vcap@ubuntu:~/.ssh$">vcap@ubuntu:~/.ssh$</a> telnet 10.254.1.3 22<br>
          Trying 10.254.1.3...<br>
          Connected to 10.254.1.3.<br>
          Escape character is '^]'.<br>
          SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2<br>
          <br>
          <a class="moz-txt-link-abbreviated" href="mailto:vcap@ubuntu:~/.ssh$">vcap@ubuntu:~/.ssh$</a> ssh <a moz-do-not-send="true"
            href="mailto:ubuntu@10.254.1.3">ubuntu@10.254.1.3</a><br>
          <span style="color:rgb(255,0,0)">Permission denied
            (publickey).</span><br>
          <br>
        </div>
        <div>I guess the newServer is configured to be accessed via ssh
          key. But, I have no idea what's the private key.<br>
          <br>
        </div>
        <div>BTW, from the log of web console, I can see:<br>
          <br>
          <pre class="">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@newserver (DSA)
ec2: 256 ed:37:dd:5a:c5:3e:94:1a:6d:6a:d7:f7:a6:3c:77:24  root@newserver (ECDSA)
ec2: 2048 12:21:cf:11:ee:fc:e5:40:97:1f:ed:f4:1b:79:69:f3  root@newserver (RSA)
ec2: -----END SSH HOST KEY FINGERPRINTS-----
ec2: #############################################################
-----BEGIN SSH HOST KEY KEYS-----
ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHjWoLKvRYpqeetH9LwUikGPAX5gkVbGbvUcfEM5TpNG5A8PHyvsC+qcEaFvBj/TSO3CGpaEEHrnclA5tA8V9/A= root@newserver
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC384S4T8GNLW88LbtQlTVACG6WWKl34wnlmU0FYU18hE/fL27GoXxi94hIZGzKg6oFJ420VUKPKOOzv/H51oNgqVKmHqf03v7ljzDp2gJ4pJrMI9+rxeQ5VCgcZ/C3VNPhh1rJc6jKDCWni3A+NOUkgD2oo1kruxc4rJmtQ4A4xCU22l8myg6/odMr7FAPUJT1N4BWjXwnglbfOJOjaQ5vWMNyIYBcmooEaGDmLeovSuX0N6k6Un2YccwhQ87vxNt3QCiu6cPR5ljEL4xXTUgUBVNRLqxSFqEDZy9Y5LrM6Fl5W/b0IaK8soHVacKuThW1d5IpXUknlSwTK7gG41ep root@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
</pre>
           Any help will be appreciated, thanks!<br>
          <br>
          --<br>
        </div>
        <div>Regards,<br>
        </div>
        <div>Frank<br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Mailing list: <a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a>
Post to     : <a class="moz-txt-link-abbreviated" href="mailto:openstack@lists.openstack.org">openstack@lists.openstack.org</a>
Unsubscribe : <a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Michaël Van de Borne
R&D Engineer, SOA team, CETIC
Phone: +32 (0)71 49 07 45 Mobile: +32 (0)472 69 57 16, Skype: mikemowgli
<a class="moz-txt-link-abbreviated" href="http://www.cetic.be">www.cetic.be</a>, rue des Frères Wright, 29/3, B-6041 Charleroi
</pre>
  </body>
</html>