Credentials for Ubuntu Image

asked 2019-03-03 06:04:34 -0600

Vysakh-SN gravatar image

updated 2019-03-03 10:19:18 -0600

I now have a question with respect to OpenStack cloud images. I have downloaded an Ubuntu image to OpenStack host and is using this image to create VMs. I have seen several questions got answered like create keypair and use private key to SSH to this VM. But in my case even if I use the private key, it asks me for password, which I don't know. I am trying as ubuntu username, which I believe is default. When I tried using novnc console after executing steps from the below link, I was able to login, at the same time not normal SSH from outside.

I followed ( too but didnt work.

Can someone help me with the password, if any or the correct way to access the VM.

Update1: There's no .ssh folder in the location ~/, not sure whether that's the issue.

edit retag flag offensive close merge delete


You were able to login to the console without knowing the password?

As far as I know, the ubuntu user doesn't have a password. You can only log in with a key or by setting a password using cloud-config. My guess: Your user-data contains an error. Does it include tab characters?

Bernd Bausch gravatar imageBernd Bausch ( 2019-03-03 07:47:35 -0600 )edit

The instance's console log (openstack console log show INSTANCE) might contain information about the failed cloud-config setup.

Bernd Bausch gravatar imageBernd Bausch ( 2019-03-03 07:51:01 -0600 )edit

@Bernd Bausch, I made use of script customization while launching VMs. And thats how I set password and is able to login using novnc. But not through normal SSH.

Vysakh-SN gravatar imageVysakh-SN ( 2019-03-03 09:34:58 -0600 )edit

Check the cloud-init log files under /var/log. They may have information about the failure.

Just by the way: the usual way of accessing an instance is not with passwords, but ssh keys. You create a keypair, launch the instance with the key-name parameter, and log on using the private key.

Bernd Bausch gravatar imageBernd Bausch ( 2019-03-03 16:33:08 -0600 )edit

@Bernd Bausch, Yes I understand that and did the same way. But I couldn't find authorized_keys under /home/ubuntu/.ssh (actually .ssh folder itself was missing) right when the VM is launched.

Vysakh-SN gravatar imageVysakh-SN ( 2019-03-03 22:21:28 -0600 )edit