unable to ssh to the instance, password is needed

Asked by wonderzou

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: <email address hidden>,<email address hidden>,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: <email address hidden>,<email address hidden>,ssh-rsa,<email address hidden>,<email address hidden>,<email address hidden>,<email address hidden>,<email address hidden>,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,<email address hidden>
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,<email address hidden>
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,<email address hidden>,hmac-ripemd160,<email address hidden>,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,<email address hidden>,hmac-ripemd160,<email address hidden>,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,<email address hidden>,zlib
debug2: kex_parse_kexinit: none,<email address hidden>,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:52:c7:ba:66:59:34:95:79
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
debug1: Host '10.0.0.2' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:1
debug2: bits set: 506/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/tiger/mykey.priv ((nil))
debug3: input_userauth_banner
C

Id Conexion : 0000165778

debug1: Authentications that can continue: keyboard-interactive,password
debug3: start over, passed a different list keyboard-interactive,password
debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug2: we sent a keyboard-interactive packet, wait for reply
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 1
Password:

Any help is appreciated

thanks

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
wonderzou
Solved:
Last query:
Last reply:
Revision history for this message
Brian Lamar (blamar) said :
#1

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?

Revision history for this message
wonderzou (wonder-zou) said :
#2

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

Revision history for this message
wonderzou (wonder-zou) said :
#3

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

Revision history for this message
Brian Lamar (blamar) said :
#4

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 ?

Revision history for this message
wonderzou (wonder-zou) said :
#5

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

thanks again :)

Revision history for this message
wonderzou (wonder-zou) said :
#6

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

Revision history for this message
wonderzou (wonder-zou) said :
#7

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

Revision history for this message
wonderzou (wonder-zou) said :
#8

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

Revision history for this message
Brian Lamar (blamar) said :
#9

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

Revision history for this message
wonderzou (wonder-zou) said :
#10

oot@tiger-desktop:/var/lib/nova/instances/instance-00000004# ls -al
total 35052
drwxr-xr-x 2 nova nogroup 4096 2011-08-23 11:14 .
drwxr-xr-x 4 nova root 4096 2011-08-23 11:13 ..
-rw-r----- 1 libvirt-qemu kvm 0 2011-08-23 11:13 console.log
-rw-r--r-- 1 libvirt-qemu kvm 35651584 2011-08-23 11:13 disk
-rw-r--r-- 1 libvirt-qemu kvm 4407632 2011-08-23 11:13 kernel
-rw-r--r-- 1 nova nogroup 1604 2011-08-23 11:13 libvirt.xml

Revision history for this message
wonderzou (wonder-zou) said :
#11

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

i also used ssh <email address hidden> . and provide password ubuntu , it also doesn't work :(

Revision history for this message
wonderzou (wonder-zou) said :
#12

hi :
maybe i find the problem.

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

thank you again