Running sshd on another port with maximum debug level: $ sudo /usr/sbin/sshd -d -d -d -p 2222 > /vagrant/sshd-log 2>&1
changeing testserver port to 2222 and then calling: $ /ansible testserver -m ping -v -v -v -v yields: debug2: load_server_config: filename /etc/ssh/sshd_config debug2: load_server_config: done config len = 763 debug2: parse_server_config: config /etc/ssh/sshd_config len 763 debug3: /etc/ssh/sshd_config:5 setting Port 22 debug3: /etc/ssh/sshd_config:9 setting Protocol 2 debug3: /etc/ssh/sshd_config:11 setting HostKey /etc/ssh/ssh_host_rsa_key debug3: /etc/ssh/sshd_config:12 setting HostKey /etc/ssh/ssh_host_dsa_key debug3: /etc/ssh/sshd_config:13 setting HostKey /etc/ssh/ssh_host_ecdsa_key debug3: /etc/ssh/sshd_config:14 setting HostKey /etc/ssh/ssh_host_ed25519_key debug3: /etc/ssh/sshd_config:16 setting UsePrivilegeSeparation yes debug3: /etc/ssh/sshd_config:19 setting KeyRegenerationInterval 3600 debug3: /etc/ssh/sshd_config:20 setting ServerKeyBits 1024 debug3: /etc/ssh/sshd_config:23 setting SyslogFacility AUTH debug3: /etc/ssh/sshd_config:24 setting LogLevel DEBUG3 debug3: /etc/ssh/sshd_config:27 setting LoginGraceTime 120 debug3: /etc/ssh/sshd_config:28 setting PermitRootLogin without-password debug3: /etc/ssh/sshd_config:29 setting StrictModes yes debug3: /etc/ssh/sshd_config:31 setting RSAAuthentication yes debug3: /etc/ssh/sshd_config:32 setting PubkeyAuthentication yes debug3: /etc/ssh/sshd_config:36 setting IgnoreRhosts yes debug3: /etc/ssh/sshd_config:38 setting RhostsRSAAuthentication no debug3: /etc/ssh/sshd_config:40 setting HostbasedAuthentication no debug3: /etc/ssh/sshd_config:45 setting PermitEmptyPasswords no debug3: /etc/ssh/sshd_config:49 setting ChallengeResponseAuthentication no debug3: /etc/ssh/sshd_config:52 setting PasswordAuthentication yes debug3: /etc/ssh/sshd_config:64 setting X11Forwarding yes debug3: /etc/ssh/sshd_config:65 setting X11DisplayOffset 10 debug3: /etc/ssh/sshd_config:66 setting PrintMotd no debug3: /etc/ssh/sshd_config:67 setting PrintLastLog yes debug3: /etc/ssh/sshd_config:68 setting TCPKeepAlive yes debug3: /etc/ssh/sshd_config:75 setting AcceptEnv LANG LC_* debug3: /etc/ssh/sshd_config:77 setting Subsystem sftp /usr/lib/openssh/sftp-server debug3: /etc/ssh/sshd_config:88 setting UsePAM yes debug1: sshd version OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014 debug3: Incorrect RSA1 identifier debug1: key_parse_private2: missing begin marker debug1: read PEM private key done: type RSA debug3: Incorrect RSA1 identifier debug3: Could not load "/etc/ssh/ssh_host_rsa_key" as a RSA1 public key debug1: private host key: #0 type 1 RSA debug3: Incorrect RSA1 identifier debug1: key_parse_private2: missing begin marker debug1: read PEM private key done: type DSA debug3: Incorrect RSA1 identifier debug3: Could not load "/etc/ssh/ssh_host_dsa_key" as a RSA1 public key debug1: private host key: #1 type 2 DSA debug3: Incorrect RSA1 identifier debug1: key_parse_private2: missing begin marker debug1: read PEM private key done: type ECDSA debug3: Incorrect RSA1 identifier debug3: Could not load "/etc/ssh/ssh_host_ecdsa_key" as a RSA1 public key debug1: private host key: #2 type 3 ECDSA debug1: could not open key file '/etc/ssh/ssh_host_ed25519_key': No such file or directory Could not load host key: /etc/ssh/ssh_host_ed25519_key debug1: rexec_argv[0]='/usr/sbin/sshd' debug1: rexec_argv[1]='-d' debug1: rexec_argv[2]='-d' debug1: rexec_argv[3]='-d' debug1: rexec_argv[4]='-p' debug1: rexec_argv[5]='2222' debug3: oom_adjust_setup Set /proc/self/oom_score_adj from 0 to -1000 debug2: fd 3 setting O_NONBLOCK debug1: Bind to port 2222 on 0.0.0.0. Server listening on 0.0.0.0 port 2222. debug2: fd 4 setting O_NONBLOCK debug3: sock_set_v6only: set socket 4 IPV6_V6ONLY debug1: Bind to port 2222 on ::. Server listening on :: port 2222. debug3: fd 5 is not O_NONBLOCK debug1: Server will not fork when running in debugging mode. debug3: send_rexec_state: entering fd = 8 config len 763 debug3: ssh_msg_send: type 0 debug3: send_rexec_state: done debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8 debug1: inetd sockets after dupping: 3, 3 Connection from 10.0.0.4 port 37252 on 10.0.0.223 port 2222 debug1: Client protocol version 2.0; client software version Sun_SSH_1.5 debug1: no match: Sun_SSH_1.5 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 debug2: fd 3 setting O_NONBLOCK debug2: Network child is on pid 10121 debug3: preauth child monitor started debug3: privsep user:group 104:65534 [preauth] debug1: permanently_set_uid: 104/65534 [preauth] debug1: list_hostkey_types: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256 [preauth] debug1: SSH2_MSG_KEXINIT sent [preauth] debug1: SSH2_MSG_KEXINIT received [preauth] debug2: kex_parse_kexinit: [email protected],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 [preauth] debug2: kex_parse_kexinit: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256 [preauth] debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,[email protected],[email protected],[email protected],aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected] [preauth] debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,[email protected],[email protected],[email protected],aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected] [preauth] debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-md5,hmac-sha1,[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 [preauth] debug2: kex_parse_kexinit: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-md5,hmac-sha1,[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 [preauth] debug2: kex_parse_kexinit: none,[email protected] [preauth] debug2: kex_parse_kexinit: none,[email protected] [preauth] debug2: kex_parse_kexinit: [preauth] debug2: kex_parse_kexinit: [preauth] debug2: kex_parse_kexinit: first_kex_follows 0 [preauth] debug2: kex_parse_kexinit: reserved 0 [preauth] debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1 [preauth] debug2: kex_parse_kexinit: ssh-rsa,ssh-dss [preauth] debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour128,arcfour256,arcfour,aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,3des-cbc [preauth] debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour128,arcfour256,arcfour,aes128-cbc,aes192-cbc,aes256-cbc,blowfish-cbc,3des-cbc [preauth] debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-sha1-96,hmac-md5-96 [preauth] debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-sha1-96,hmac-md5-96 [preauth] debug2: kex_parse_kexinit: zlib,none [preauth] debug2: kex_parse_kexinit: zlib,none [preauth] debug2: kex_parse_kexinit: en-US [preauth] debug2: kex_parse_kexinit: en-US [preauth] debug2: kex_parse_kexinit: first_kex_follows 0 [preauth] debug2: kex_parse_kexinit: reserved 0 [preauth] debug2: mac_setup: setup hmac-md5 [preauth] debug1: kex: client->server aes128-ctr hmac-md5 none [preauth] debug2: mac_setup: setup hmac-md5 [preauth] debug1: kex: server->client aes128-ctr hmac-md5 none [preauth] debug1: SSH2_MSG_KEX_DH_GEX_REQUEST received [preauth] debug3: mm_request_send entering: type 0 [preauth] debug3: mm_choose_dh: waiting for MONITOR_ANS_MODULI [preauth] debug3: mm_request_receive_expect entering: type 1 [preauth] debug3: mm_request_receive entering [preauth] debug3: mm_request_receive entering debug3: monitor_read: checking request 0 debug3: mm_answer_moduli: got parameters: 1024 2048 8192 debug3: mm_request_send entering: type 1 debug2: monitor_read: 0 used once, disabling now debug3: mm_choose_dh: remaining 0 [preauth] debug1: SSH2_MSG_KEX_DH_GEX_GROUP sent [preauth] debug2: bits set: 1017/2048 [preauth] debug1: expecting SSH2_MSG_KEX_DH_GEX_INIT [preauth] debug2: bits set: 1026/2048 [preauth] debug3: mm_key_sign entering [preauth] debug3: mm_request_send entering: type 6 [preauth] debug3: mm_key_sign: waiting for MONITOR_ANS_SIGN [preauth] debug3: mm_request_receive_expect entering: type 7 [preauth] debug3: mm_request_receive entering [preauth] debug3: mm_request_receive entering debug3: monitor_read: checking request 6 debug3: mm_answer_sign debug3: mm_answer_sign: signature 0x7f506484eda0(271) debug3: mm_request_send entering: type 7 debug2: monitor_read: 6 used once, disabling now debug1: SSH2_MSG_KEX_DH_GEX_REPLY sent [preauth] debug2: kex_derive_keys [preauth] debug2: set_newkeys: mode 1 [preauth] debug1: SSH2_MSG_NEWKEYS sent [preauth] debug1: expecting SSH2_MSG_NEWKEYS [preauth] debug2: set_newkeys: mode 0 [preauth] debug1: SSH2_MSG_NEWKEYS received [preauth] debug1: KEX done [preauth] debug1: userauth-request for user vagrant service ssh-connection method none [preauth] debug1: attempt 0 failures 0 [preauth] debug3: mm_getpwnamallow entering [preauth] debug3: mm_request_send entering: type 8 [preauth] debug3: mm_getpwnamallow: waiting for MONITOR_ANS_PWNAM [preauth] debug3: mm_request_receive_expect entering: type 9 [preauth] debug3: mm_request_receive entering [preauth] debug3: mm_request_receive entering debug3: monitor_read: checking request 8 debug3: mm_answer_pwnamallow debug3: Trying to reverse map address 10.0.0.4. debug2: parse_server_config: config reprocess config len 763 debug3: mm_answer_pwnamallow: sending MONITOR_ANS_PWNAM: 1 debug3: mm_request_send entering: type 9 debug2: monitor_read: 8 used once, disabling now debug2: input_userauth_request: setting up authctxt for vagrant [preauth] debug3: mm_start_pam entering [preauth] debug3: mm_request_send entering: type 100 [preauth] debug3: mm_inform_authserv entering [preauth] debug3: mm_request_send entering: type 4 [preauth] debug2: input_userauth_request: try method none [preauth] debug3: userauth_finish: failure partial=0 next methods="publickey,password" [preauth] Connection closed by 10.0.0.4 [preauth] debug1: do_cleanup [preauth] debug3: PAM: sshpam_thread_cleanup entering [preauth] debug1: monitor_read_log: child log fd closed debug3: mm_request_receive entering debug3: monitor_read: checking request 100 debug1: PAM: initializing for "vagrant" debug1: PAM: setting PAM_RHOST to "10.0.0.4" debug1: PAM: setting PAM_TTY to "ssh" debug2: monitor_read: 100 used once, disabling now debug3: mm_request_receive entering debug3: monitor_read: checking request 4 debug3: mm_answer_authserv: service=ssh-connection, style=, role= debug2: monitor_read: 4 used once, disabling now debug3: mm_request_receive entering debug1: do_cleanup debug1: PAM: cleanup debug3: PAM: sshpam_thread_cleanup entering debug1: Killing privsep child 10121 On Wednesday, April 29, 2015 at 1:09:26 PM UTC+2, Sibin Arsenijevic wrote: > > I had exactly the same bug only a bit different problem. Ubuntu 14.04, > ansible installed from your repo via apt. > > user@machine:~/ansible$ ansible --version > ansible 1.9.0.1 > > user@machine:~/ansible$ ansible -m ping machine2 *-vvvv* > SSH password: > SUDO password[defaults to SSH password]: > <192.168.35.81> ESTABLISH CONNECTION FOR USER: user > <192.168.35.81> REMOTE_MODULE ping > <192.168.35.81> EXEC sshpass -d6 ssh -C -tt -vvv -o ControlMaster=auto -o > ControlPersist=60s -o > ControlPath="/home/user/.ansible/cp/ansible-ssh-%h-%p-%r" -o > StrictHostKeyChecking=no -o Port=22 -o > IdentityFile="/home/user/.ssh/ansible" -o GSSAPIAuthentication=no -o > PubkeyAuthentication=no -o ConnectTimeout=10 192.168.1.1 /bin/sh -c 'mkdir > -p $HOME/.ansible/tmp/ansible-tmp-1430303346.24-38061325826660 && chmod > a+rx $HOME/.ansible/tmp/ansible-tmp-1430303346.24-38061325826660 && echo > $HOME/.ansible/tmp/ansible-tmp-1430303346.24-38061325826660' > machine2.domain.com | FAILED => SSH Error: Permission denied > (publickey,password). > while connecting to 192.168.1.1:22 > *It is sometimes useful to re-run the command using -vvvv, which prints > SSH debug output to help diagnose the issue*. > > So no SSH debug output even when run with -vvvv. > > But i guess i have found what was causing it in my case at least. I had an > offending key (because that ip used to belong to other host) in > known_hosts. I have removed the offending key using ssh-keygen -R and it > now works as it should. I found my problem by going through SSH logs > directly since Ansible didn't output any of the ssh debug logs. > > I understand that your problem is different as you have tried connecting > using the ssh and host_key is not a problem but this still points to > inconsistency in -vvvv behaviour. > > Hope this helps a bit :) > > > On Tuesday, April 28, 2015 at 11:07:13 PM UTC+2, dusank wrote: >> >> Any luck reproducing the bug? >> >> On Tuesday, April 28, 2015 at 10:18:09 PM UTC+2, Brian Coca wrote: >>> >>> hmm, im running with 2.6.4, let me update the image. >>> >>> >>> >>> -- >>> Brian Coca >>> >> -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a3f333a6-5d43-4b8c-926e-1d9d231ff3d3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
