Ask Your Question
2

Can ping the VM but can't ssh into the VM

asked 2014-02-19 22:57:09 -0500

updated 2014-02-19 22:57:48 -0500

I downloaded the fedora 20 image from here.

I followed the instruction given on the RDO's site. After launching it, I see the prompt for username and password. I can ping to the VM but can't SSH to it. For SSH I downloaded the pem prompted at the dashboard and copied it to ~/.ssh/. I tried

ssh -i ~/.ssh/id_key.pem floating_ip_of_machine

but it failed to login.

I even tried the following code at the customization script, it was taken from some blog.


#cloud-config
hostname: node
password: secret
chpasswd: { expire: False }
ssh_pwauth: True
 

But I still couldn't log in with the above credentials at the VM. What could be the issue/solution for this?

If you have any link to cloud images of the following distros, ie, CentOS, Fedora, Ubuntu with known login credentials that could be helpful but it would be interesting to learn why this is going wrong.

edit retag flag offensive close merge delete

Comments

What is the exact error that you get when you try to login?

Jobin gravatar imageJobin ( 2014-02-21 06:28:56 -0500 )edit

Connection refused when I try to use Ubuntu, never terminated in case of Fedora. I have added rule for port 22. As of now I have created my own image for coming over this issue.

prasoontelang gravatar imageprasoontelang ( 2014-02-21 06:38:37 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-02-20 00:56:42 -0500

Sadique Puthen gravatar image

You can set a root password to the image before uploading it to glance. This will allow you to log in and see whether cloud-init has populated the ssh key properly or not and troubleshoot if it hasn't.

# guestfish --rw -a <image-name>
><fs> run
><fs>list-filesystems
><fs> mount /dev/vda1 /
><fs> vi /etc/shadow

Replace the encrypted password. This will set the password for the image permanently. An encrypted password can be created using openssl command.

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-02-19 22:57:09 -0500

Seen: 432 times

Last updated: Feb 20 '14