how to log in Ubuntu Cloud images ?

asked 2015-08-03 06:22:13 -0500

abhishek-talwar gravatar image

updated 2015-08-03 06:38:50 -0500

I have a multinode OpenStack kilo setup with a controller node, network node and 2 compute nodes. I have installed ubuntu cloud image (trusty) in my my /tmp/images directory and created an image from it.

I have created an instance of the ubuntu image and now I am trying to log in that but cannot find the default password.

I followed a link and created a keypair using the command ' ssh-keygen -P "" -b 2048 ' and used this keypair to create a vm.

Now when I am trying to ssh into this VM it is giving me an error "ssh: connect to host 192.168.1.7 port 22: Connection timed out".

Also if I get a vnc console for this VM it gives an error "error : invalid arch-independent ELF magic."

How to resolve this error.

edit retag flag offensive close merge delete

Comments

What SSH client are you using? You must use tell your client to use the right key for login. Way of doing this depends on the client.

Openstackuser2013 gravatar imageOpenstackuser2013 ( 2015-08-03 06:44:14 -0500 )edit

Use your keypair when using SSH to connect to the instance, also remember to use the "ubuntu" user since the root user is disabled by default.

Tobias Urdin gravatar imageTobias Urdin ( 2015-08-03 09:07:20 -0500 )edit

I have created a key using "ssh-keygen" and then added it using the nova keypair add command. The VM goes to active state using this key but then when I try to login in this VM using "ssh -i .ssh/id_rsa.pub ubuntu@192.168.1.5" it gives me a connection timeout error "ssh: connect to host 192.168.1.5.

abhishek-talwar gravatar imageabhishek-talwar ( 2015-08-04 01:40:05 -0500 )edit

Do you have access to the host 192.168.1.5? Does it respond to ping? Can you telnet to port 22? Make sure you have connectivity to the host, maybe you don't then you can try to execute a ping inside the namespace (network) where that host lives (if you are running Neutron).

Tobias Urdin gravatar imageTobias Urdin ( 2015-08-04 01:43:24 -0500 )edit

post the output of "ssh -i .ssh/id_rsa.pub ubuntu@192.168.1.5 -v" please.

schegi gravatar imageschegi ( 2015-08-04 06:23:07 -0500 )edit

OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug1: Connecting to 192.168.1.5 [192.168.1.5] port 22. debug1: connect to address 192.168.1.5 port 22: Connection timed out ssh: connect to ho

abhishek-talwar gravatar imageabhishek-talwar ( 2015-08-04 07:03:00 -0500 )edit

looks like a connectivity problem. please try what tobasco recommend in his comment ping/telnet etc. Other reason could be a not running ssh daemon but i would check for connectivity problems first.

schegi gravatar imageschegi ( 2015-08-04 07:21:50 -0500 )edit

Hi,

I have a doubt regarding this. I created the key on the controller node and created a VM with it. Now the VM is in Active state and gets an ip address of the range of tenant network (192.168.1.0/24). But my controller is not on the same network range so how will it be able to ping it.

abhishek-talwar gravatar imageabhishek-talwar ( 2015-08-05 00:29:03 -0500 )edit

Also do I need to assign a Floating-Ip to the VM first and then try to SSH it ?

abhishek-talwar gravatar imageabhishek-talwar ( 2015-08-05 00:29:37 -0500 )edit

I am able to ping it now. But then i am getting as error

abhishek-talwar gravatar imageabhishek-talwar ( 2015-08-05 00:59:32 -0500 )edit