Ask Your Question
0

unable to ssh to the instance, password is needed

asked 2011-08-18 02:04:32 -0500

wonder-zou gravatar image

hi :

root@tiger-desktop:/home/tiger# ssh -i mykey.priv root@10.0.0.2

Id Conexion : 0000165778

Password:

now i have a running instance, but when i try to ssh , a password is needed.

i have done the authorization, but why the password is needed?

i use the flatnetwork manager

#ssh -vvv -i /home/tiger/mykey.priv -p 22 root@10.0.0.2OpenSSH_5.8p1 Debian-1ubuntu3, OpenSSL 0.9.8o 01 Jun 2010 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug2: ssh_connect: needpriv 0 debug1: Connecting to 10.0.0.2 [10.0.0.2] port 22. debug1: Connection established. debug1: permanently_set_uid: 0/0 debug3: Incorrect RSA1 identifier debug3: Could not load "/home/tiger/mykey.priv" as a RSA1 public key debug2: key_type_from_name: unknown key type '-----BEGIN' debug3: key_read: missing keytype debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug3: key_read: missing whitespace debug2: key_type_from_name: unknown key type '-----END' debug3: key_read: missing keytype debug1: identity file /home/tiger/mykey.priv type -1 debug1: identity file /home/tiger/mykey.priv-cert type -1 debug1: Remote protocol version 2.0, remote software version Cisco-1.25 debug1: no match: Cisco-1.25 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_5.8p1 Debian-1ubuntu3 debug2: fd 3 setting O_NONBLOCK debug3: load_hostkeys: loading entries for host "10.0.0.2" from file "/root/.ssh/known_hosts" debug3: load_hostkeys: found key type RSA in file /root/.ssh/known_hosts:1 debug3: load_hostkeys: loaded 1 keys debug3: order_hostkeyalgs: prefer hostkeyalgs: ssh-rsa-cert-v01@openssh.com,ssh-rsa-... debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-rsa-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-rsa,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-dss-cert-v00@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-dss debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcf... debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcf... debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.co... debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.co... debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-rsa debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc debug2: kex_parse_kexinit: hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96 debug2: kex_parse_kexinit: hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96 debug2: kex_parse_kexinit: none debug2: kex_parse_kexinit: none debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: mac_setup: found hmac-md5 debug1: kex: server->client aes128-cbc hmac-md5 none debug2: mac_setup: found hmac-md5 debug1: kex: client->server aes128-cbc hmac-md5 none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug2: dh_gen_key: priv key bits set: 122/256 debug2: bits set: 491/1024 debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug1: Server host key: RSA ad:22:75:8e:84:57:97:08 ... (more)

edit retag flag offensive close merge delete

12 answers

Sort by ยป oldest newest most voted
0

answered 2011-08-22 02:48:58 -0500

wonder-zou gravatar image

OK , I will try it, later will get back to you.

thanks again :)

edit flag offensive delete link more
0

answered 2011-08-18 15:13:47 -0500

blamar gravatar image

More information is needed regarding how you created the instance and how your environment is set up. Can you provide the commands used to start the instances and set up your SSH key?

edit flag offensive delete link more
0

answered 2011-08-19 01:56:27 -0500

wonder-zou gravatar image

and the flags --network_manager=nova.network.manager.FlatManager --flat_network_bridge=br100 --dhcpbridge_flagfile=/etc/nova/nova.conf --dhcpbridge=/usr/bin/nova-dhcpbridge --logdir=/var/log/nova --state_path=/var/lib/nova --sql_connection=mysql://root:testsc@10.140.xxx.xxx/nova --s3_host=10.140.xxx.xxx --glance_api_servers=10.140.xxx.xxxx9292 --FAKE_subdomain=ec2 --cc_host=10.140.xxx.xxx --glance_host=10.140.xxx.xxx --image_service=nova.image.glance.GlanceImageService --ec2_url=http://10.140.xxx.xxx:8773/services/Cloud --lock_path=/var/lock/nova --verbose

edit flag offensive delete link more
0

answered 2011-08-23 03:03:48 -0500

wonder-zou gravatar image

hi Brian: i also try this package ubuntu1010-UEC-localuser-image.tar.gz , it also need password.

i also used ssh ubuntu@XXX.XXX.XXX.XXX . and provide password ubuntu , it also doesn't work :(

edit flag offensive delete link more
0

answered 2011-08-31 02:11:54 -0500

wonder-zou gravatar image

hi : maybe i find the problem.

use 64-bit os in 32-bit host :)

thank you again

edit flag offensive delete link more
0

answered 2011-08-19 01:50:25 -0500

wonder-zou gravatar image

hi Brian:

thank you for the reply. I follow this to run the instance and create ssh key: http://wiki.openstack.org/RunningNova

and my system is ubuntu 11.04

#euca-describe-instances RESERVATION r-46aslcaz mycloud default INSTANCE i-00000002 ami-00000004 10.0.0.2 10.0.0.2 running mykey (mycloud, tiger-desktop) 0 m1.tiny 2011-08-18T03:28:07Z nova aki-00000001 ari-00000002

ps -aux|grep dnsmasq nobody 12866 0.0 0.0 4972 992 ? S Aug18 0:00 dnsmasq

thanks again

edit flag offensive delete link more
0

answered 2011-08-22 13:06:58 -0500

blamar gravatar image

These are all seemingly normal logs, can you give the output of your instance's console.log? It's normally located in cat /var/lib/nova/instances/instance-0000000X/console.log

edit flag offensive delete link more
0

answered 2011-08-19 13:49:50 -0500

blamar gravatar image

I just noticed something which might help? The initial response your SSH server is giving you doesn't allow for publickey negotiation:

Authentications that can continue: keyboard-interactive,password

Which AMI images are you using? Can you try using the latest images provided by http://images.ansolabs.com/tty.tgz ?

edit flag offensive delete link more
0

answered 2011-08-22 03:08:45 -0500

wonder-zou gravatar image

hi Brian: i just cksum the image you proved with the current image that i used. i think they are totally the same: root@tiger-desktop:/home/tiger# cksum tty.tgz 942798640 23717804 tty.tgz

root@tiger-desktop:/home/tiger/Downloads# cksum tty.tgz 942798640 23717804 tty.tgz

do you think the server has the proper directory modes or file modes for .ssh or authorized_keys in the root path?

how can i check the rights in the images?

Besides, i just have one dnsmasq ps -aux|grep dnsmasq nobody 12866 0.0 0.0 4972 992 ? S Aug18 0:00 dnsmasq is that OK?

thanks

edit flag offensive delete link more
0

answered 2011-08-22 09:45:00 -0500

wonder-zou gravatar image

some logs may be useful.

2011-08-22 17:53:40,571 DEBUG nova.utils [-] Running cmd (subprocess): sudo tune2fs -c 0 -i 0 /dev/nbd15 from (pid=20318) execute /usr/lib/pymodules/python2.7/nova/utils.py:164 2011-08-22 17:53:42,546 DEBUG nova.utils [-] Running cmd (subprocess): sudo mount /dev/nbd15 /tmp/tmpN1jyLU from (pid=20318) execute /usr/lib/pymodules/python2.7/nova/utils.py:164 2011-08-22 17:53:42,646 DEBUG nova.utils [-] Running cmd (subprocess): sudo mkdir -p /tmp/tmpN1jyLU/root/.ssh from (pid=20318) execute /usr/lib/pymodules/python2.7/nova/utils.py:164 2011-08-22 17:53:42,873 DEBUG nova.utils [-] Running cmd (subprocess): sudo chown root /tmp/tmpN1jyLU/root/.ssh from (pid=20318) execute /usr/lib/pymodules/python2.7/nova/utils.py:164 2011-08-22 17:53:42,896 DEBUG nova.utils [-] Running cmd (subprocess): sudo chmod 700 /tmp/tmpN1jyLU/root/.ssh from (pid=20318) execute /usr/lib/pymodules/python2.7/nova/utils.py:164 2011-08-22 17:53:42,917 DEBUG nova.utils [-] Running cmd (subprocess): sudo tee -a /tmp/tmpN1jyLU/root/.ssh/authorized_keys from (pid=20318) execute /usr/lib/pymodules/python2.7/nova/utils.py:164 2011-08-22 17:53:42,981 DEBUG nova.utils [-] Running cmd (subprocess): sudo mkdir -p /tmp/tmpN1jyLU/etc/network from (pid=20318) execute /usr/lib/pymodules/python2.7/nova/utils.py:164 2011-08-22 17:53:43,032 DEBUG nova.utils [-] Running cmd (subprocess): sudo chown root:root /tmp/tmpN1jyLU/etc/network from (pid=20318) execute /usr/lib/pymodules/python2.7/nova/utils.py:164 2011-08-22 17:53:43,054 DEBUG nova.utils [-] Running cmd (subprocess): sudo chmod 755 /tmp/tmpN1jyLU/etc/network from (pid=20318) execute /usr/lib/pymodules/python2.7/nova/utils.py:164 2011-08-22 17:53:43,074 DEBUG nova.utils [-] Running cmd (subprocess): sudo tee /tmp/tmpN1jyLU/etc/network/interfaces from (pid=20318) execute /usr/lib/pymodules/python2.7/nova/utils.py:164 2011-08-22 17:53:43,113 DEBUG nova.utils [-] Running cmd (subprocess): sudo umount /dev/nbd15 from (pid=20318) execute /usr/lib/pymodules/python2.7/nova/utils.py:164 2011-08-22 17:53:45,531 DEBUG nova.utils [-] Running cmd (subprocess): rmdir /tmp/tmpN1jyLU from (pid=20318) execute /usr/lib/pymodules/python2.7/nova/utils.py:164

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: 2011-08-18 02:04:32 -0500

Seen: 153 times

Last updated: Aug 31 '11