Ask Your Question
0

Cannot ssh ubuntu cloud image instance with floating IP but can ssh it with private IP

asked 2015-02-18 22:40:40 -0500

TonyZ gravatar image

I setup a test 3 nodes openstack test environment. I can launch, ping and ssh to CirrOS instance with floating IP. After that I created a instance with ubuntu cloud image. When launch the instance I create a new user and write the instance SSHD config file to enable password auth with cloud config script .

Now I can ping the ubuntu instance, but can not ssh to the instance with floating IP. I can ssh to the CirrOS instance first and in the cirros instance I can ssh to the ubuntu instance with private IP.

I checked the security group. The CirrOS and ubuntu instance are in the same group. When I ssh to the ubuntu instance with private IP, I checked the iptables, the iptables is disabled.

Any idea's about that?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-02-18 23:28:58 -0500

updated 2015-02-18 23:29:54 -0500

hey there,

the procedure to ssh to ubuntu image is from private RSA key.

you have launched the instance with a key which is by default a public key, you have to do the series of steps to access the ubuntu instance from a private key.

1. nova keypair-add OSKEY > OSKEY.priv (where OSKEY is the one you generated from ssh-keygen command)
2. chmod 600 OSKEY
3. now launch the instance with the OSKEY as the key
4. ssh -i OSKEY.priv ubuntu@floatingIP

i hope you done it the same way give a try and let me know

edit flag offensive delete link more

Comments

Thank you for the response. I think Its not the key issue. I have enabled the password auth with cloud config script. I also be able to ssh the Ubuntu with private ip. And also be able to shh the cirros with floating ip. Just can not ssh the Ubuntu with floating ip

TonyZ gravatar imageTonyZ ( 2015-02-19 01:20:23 -0500 )edit

I got the same problem. The key works fine with Centos image, but doesn't with Ubuntu.

Ha Son Hai gravatar imageHa Son Hai ( 2015-03-06 03:49:36 -0500 )edit

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

Stats

Asked: 2015-02-18 22:40:40 -0500

Seen: 963 times

Last updated: Feb 18 '15