What is default username and password for Ubuntu image uploaded using glance image-create ?

asked 2013-08-29 00:40:29 -0500

anonymous user


updated 2013-09-05 20:14:12 -0500

What is default username and password for Ubuntu image uploaded using glance image-create ?

I have created image using following command -

glance image-create --name=ubuntu-12.04.2-server-cloudimg-amd64 --is-public=true --container-format=bare --disk-format=qcow2 </ubuntu-12.04.2-server-cloudimg-amd64-disk1.img

Image is getting created. But when I launch instance I am not able to Login to the instance .

Can anybody tell me what is default username and password for ubuntu-12.04.2-server ?

edit retag flag offensive close merge delete


Can not do ssh also : $ ip netns exec qdhcp-d3ec7276-5869-4904-b13f-2e36b1da13d1 ssh -i myKey ubuntu@ Warning: Identity file myKey not accessible: No such file or directory. Read from socket failed: Connection reset by peer

shalmali gravatar imageshalmali ( 2013-08-29 05:37:39 -0500 )edit

seems like it can't find the file myKey. You can download it using Horizon, and you need change its mode to 0600

darragh-oreilly gravatar imagedarragh-oreilly ( 2013-08-29 06:12:34 -0500 )edit

4 answers

Sort by ยป oldest newest most voted

answered 2013-08-29 03:28:28 -0500

darragh-oreilly gravatar image

I don't think it has password login enabled. So you need to generate a keypair, boot with it, then 'ssh -i key ubuntu@x.x.x.x'

edit flag offensive delete link more


I need to login to the console of the VM (not ssh). Is there anyway to access this image from the console login?

jjuzwik gravatar imagejjuzwik ( 2014-10-07 16:28:58 -0500 )edit

With ubuntu/centos you'll have to use the key as that's how most images are created. To allow password login you have to modify sshd.

mpetason gravatar imagempetason ( 2014-10-07 16:31:46 -0500 )edit

This is a disk image, and you are only concerned about logging via console? Use losetup on the image, use kpartx -av on the loop, mount that partition on your VM Host, edit the shadow file, make the root password empty, then unmount it, etc. Login as root from console after boot and set its pwd

TB gravatar imageTB ( 2015-01-08 15:10:04 -0500 )edit

answered 2013-11-05 09:08:01 -0500

DennyZhang gravatar image

Default installation ubuntu and fedora cloud image doesn't seems to have username/password for ssh login. I bypass using this, by creating a keypair. CirrOS have username/password, you can use it for POC purpose.

edit flag offensive delete link more


How to create a keypair to using SSH login on Ubuntu 12.04

leethaoqn gravatar imageleethaoqn ( 2014-03-31 03:58:20 -0500 )edit

what is username and password for ubuntu 12.04 cloud image . Can anybody help me..

santosh.rath gravatar imagesantosh.rath ( 2014-09-03 00:39:46 -0500 )edit

you need to use key pair for password, username is ubuntu.

SGPJ gravatar imageSGPJ ( 2014-09-03 02:11:40 -0500 )edit

Generate a 2048 bit keypair with no passphrase using 'ssh-keygen -P "" -b 2048' . Copy/paste the contents of the id_rsa.pub file that is generated into your openstack dashboard ( Project -> Access & Security -> Keypairs ) . And ssh using the private key with 'ssh -i ~/.ssh/id_rsa ubuntu@x.x.x.x'

neerbeer gravatar imageneerbeer ( 2015-01-23 14:33:20 -0500 )edit

Hey Guys, Totally new to OpenStack, When I am generating the keypair do I do it on the controller itself? Thanks,

Nexusguy59 gravatar imageNexusguy59 ( 2016-08-16 09:33:15 -0500 )edit

answered 2014-06-10 10:41:50 -0500

I had the same issue... but I managed to login to the instance. Firstly, generated a keypair and then initiating an instance by this command: nova boot --image IMAGE_NAME --flavor FLAVOR_NAME --key_name KEYPAIR INSTANCE_NAME. (e.g nova boot --image Ubuntu 13.10 --flavor m1.small --key_name id_rsa myFirstInstance). After that you should find out the ip address of that instance, then ssh to it. (ssh unbuntu@x.x.x.x , or root@x.x.x.x ). Then you should be prompted for the passphrase you entered for the keypair.

edit flag offensive delete link more

answered 2016-12-30 06:27:39 -0500

If you want to login directly from the horizon console then.

1: Mount the Img file

2: Create encrypted password python -c 'import crypt; print crypt.crypt("root123", "$1$SsomeSSalt$")'


  1. Edit the /etc/shadow file

(Add the string that you have generated in from of the username) eg: root:$1$SsomeSSa$mHx7fXSHeerUBxukc0AZk/:::::

save the file and launch the new instance with the image.

then you can directly login into the console.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2013-08-29 00:40:29 -0500

Seen: 83,300 times

Last updated: Jun 10 '14