Ask Your Question
0

ssh key generation for Fedora glance image

asked 2014-11-17 09:47:31 -0500

Pradip gravatar image

updated 2014-11-17 09:57:16 -0500

dbaxps gravatar image

Hello,

stack@localhost:~/devstack$ glance image-list
+--------------------------------------+---------------------------------+-------------+------------------+-----------+--------+
| ID                                   | Name                            | Disk Format | Container Format | Size      | Status |
+--------------------------------------+---------------------------------+-------------+------------------+-----------+--------+
| f66d11c7-cebd-447c-95af-a4573248945a | Fedora-x86_64-20-20140618-sda   | qcow2       | bare             | 209649664 | active |
+--------------------------------------+---------------------------------+-------------+------------------+-----------+--------+

I did a Nova key-pair add:

nova keypair-add oskey1 > oskey1.priv chmod 600 oskey1.priv

1. Now how can I boot the VM with this key-pair 
2. Once booted up, how can I ssh to it.

I already have a floating IP configured as follows:

stack@localhost:~/devstack$ nova list
+--------------------------------------+-------+--------+------------+-------------+------------------------------+
| ID                                   | Name  | Status | Task State | Power State | Networks                     |
+--------------------------------------+-------+--------+------------+-------------+------------------------------+
| ce3d0e66-0858-4156-98ed-25f3bc7ace29 | myvm1 | ACTIVE | -          | Running     | private=10.0.0.2, 172.24.4.1 |
+--------------------------------------+-------+--------+------------+-------------+------------------------------+

Thanks in advance, Pradip

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2014-11-17 10:07:32 -0500

dbaxps gravatar image

updated 2014-11-17 10:15:25 -0500

First

nova boot --flavor 2 --key_name oskey1 --image f66d11c7-cebd-447c-95af-a4573248945a  vf20vm

Second create a new floating IP

nova floating-ip-create public

Third assign new floating IP to vf20vm

 nova list => to get instance-id of vf20vm
 nova add-floating-ip  instance-id 172.24.4.2  ( if previous was 172.24.4.1)

Fourth

 $ ping 172.24.4.2
 $ ssh -i oskey1.priv fedora@172.24.4.2
edit flag offensive delete link more

Comments

Thank You very much! Thanks for the baby-sitting.

--pradip

Pradip gravatar imagePradip ( 2014-11-17 22:56:07 -0500 )edit
0

answered 2014-11-17 22:56:56 -0500

Pradip gravatar image

stack@localhost:~/devstack$ ssh -i oskey2.priv fedora@172.24.4.2 The authenticity of host '172.24.4.2 (172.24.4.2)' can't be established. RSA key fingerprint is de:3a:0e:c6:94:9d:f6:5c:38:43:e8:b0:14:19:be:54. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '172.24.4.2' (RSA) to the list of known hosts.

[fedora@myvm1 ~]$ [fedora@myvm1 ~]$ ls -l /dev/vdb brw-rw----. 1 root disk 252, 16 Nov 18 04:41 /dev/vdb

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-11-17 09:47:31 -0500

Seen: 199 times

Last updated: Nov 17 '14