So I ran sshd on the target machine in a debugger:
# gdb /usr/sbin/sshd
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
warning: The current binary is a PIE (Position Independent Executable), which
GDB does NOT currently support. Most debugger features will fail if used
in this session.
Reading symbols from /usr/sbin/sshd...(no debugging symbols found)...done.
(gdb) set args -dddd -p22222
(gdb) run
Starting program: /usr/sbin/sshd -dddd -p22222
debug2: load_server_config: filename /etc/ssh/sshd_config
debug2: load_server_config: done config len = 637
debug2: parse_server_config: config /etc/ssh/sshd_config len 637
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_key
debug3: /etc/ssh/sshd_config:13 setting HostKey /etc/ssh/ssh_host_rsa_key
debug3: /etc/ssh/sshd_config:14 setting HostKey /etc/ssh/ssh_host_dsa_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 768
debug3: /etc/ssh/sshd_config:23 setting SyslogFacility AUTH
debug3: /etc/ssh/sshd_config:24 setting LogLevel INFO
debug3: /etc/ssh/sshd_config:27 setting LoginGraceTime 600
debug3: /etc/ssh/sshd_config:28 setting PermitRootLogin yes
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:51 setting PasswordAuthentication yes
debug3: /etc/ssh/sshd_config:62 setting X11Forwarding yes
debug3: /etc/ssh/sshd_config:63 setting X11DisplayOffset 10
debug3: /etc/ssh/sshd_config:64 setting PrintMotd no
debug3: /etc/ssh/sshd_config:65 setting PrintLastLog yes
debug3: /etc/ssh/sshd_config:66 setting TCPKeepAlive yes
debug3: /etc/ssh/sshd_config:72 setting Subsystem sftp /usr/lib/openssh/sftp-server
debug3: /etc/ssh/sshd_config:74 setting UsePAM yes
debug1: sshd version OpenSSH_5.5p1 Debian-6
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-1024
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-1024
debug1: private host key: #0 type 0 RSA1
debug3: Not a RSA1 key file /etc/ssh/ssh_host_rsa_key.
debug1: read PEM private key done: type RSA
debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-1024
debug1: Checking blacklist file /etc/ssh/blacklist.RSA-1024
debug1: private host key: #1 type 1 RSA
debug3: Not a RSA1 key file /etc/ssh/ssh_host_dsa_key.
debug1: read PEM private key done: type DSA
debug1: Checking blacklist file /usr/share/ssh/blacklist.DSA-1024
debug1: Checking blacklist file /etc/ssh/blacklist.DSA-1024
debug1: private host key: #2 type 2 DSA
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-dddd'
debug1: rexec_argv[2]='-p22222'
debug3: oom_adjust_setup
Set /proc/self/oom_adj from 0 to -17
debug2: fd 3 setting O_NONBLOCK
debug1: Bind to port 22222 on 0.0.0.0.
Server listening on 0.0.0.0 port 22222.
debug2: fd 4 setting O_NONBLOCK
debug3: sock_set_v6only: set socket 4 IPV6_V6ONLY
debug1: Bind to port 22222 on ::.
Server listening on :: port 22222.
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 637
debug3: ssh_msg_send: type 0
debug3: send_rexec_state: done
debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8
Executing new program: /usr/sbin/sshd
warning: The current binary is a PIE (Position Independent Executable), which
GDB does NOT currently support. Most debugger features will fail if used
in this session.
debug1: inetd sockets after dupping: 3, 3
Connection from 172.28.0.5 port 58160
Did not receive identification string from 172.28.0.5
Program exited with code 0377.
So when logging in, the sshd process is just exiting.
So I ran sshd on the target machine in a debugger:
# gdb /usr/sbin/sshd gnu.org/ licenses/ gpl.html> www.gnu. org/software/ gdb/bugs/>...
GNU gdb (GDB) 7.0.1-debian
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://
warning: The current binary is a PIE (Position Independent Executable), which
GDB does NOT currently support. Most debugger features will fail if used
in this session.
Reading symbols from /usr/sbin/ sshd... (no debugging symbols found)...done. sshd_config config: config /etc/ssh/ sshd_config len 637 sshd_config: 5 setting Port 22 sshd_config: 9 setting Protocol 2 sshd_config: 11 setting HostKey /etc/ssh/ ssh_host_ key sshd_config: 13 setting HostKey /etc/ssh/ ssh_host_ rsa_key sshd_config: 14 setting HostKey /etc/ssh/ ssh_host_ dsa_key sshd_config: 16 setting UsePrivilegeSep aration yes sshd_config: 19 setting KeyRegeneration Interval 3600 sshd_config: 20 setting ServerKeyBits 768 sshd_config: 23 setting SyslogFacility AUTH sshd_config: 24 setting LogLevel INFO sshd_config: 27 setting LoginGraceTime 600 sshd_config: 28 setting PermitRootLogin yes sshd_config: 29 setting StrictModes yes sshd_config: 31 setting RSAAuthentication yes sshd_config: 32 setting PubkeyAuthentic ation yes sshd_config: 36 setting IgnoreRhosts yes sshd_config: 38 setting RhostsRSAAuthen tication no sshd_config: 40 setting HostbasedAuthen tication no sshd_config: 45 setting PermitEmptyPass words no sshd_config: 51 setting PasswordAuthent ication yes sshd_config: 62 setting X11Forwarding yes sshd_config: 63 setting X11DisplayOffset 10 sshd_config: 64 setting PrintMotd no sshd_config: 65 setting PrintLastLog yes sshd_config: 66 setting TCPKeepAlive yes sshd_config: 72 setting Subsystem sftp /usr/lib/ openssh/ sftp-server sshd_config: 74 setting UsePAM yes ssh/blacklist. RSA-1024 blacklist. RSA-1024 ssh_host_ rsa_key. ssh/blacklist. RSA-1024 blacklist. RSA-1024 ssh_host_ dsa_key. ssh/blacklist. DSA-1024 blacklist. DSA-1024 0]='/usr/ sbin/sshd' 1]='-dddd' 2]='-p22222'
(gdb) set args -dddd -p22222
(gdb) run
Starting program: /usr/sbin/sshd -dddd -p22222
debug2: load_server_config: filename /etc/ssh/
debug2: load_server_config: done config len = 637
debug2: parse_server_
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug3: /etc/ssh/
debug1: sshd version OpenSSH_5.5p1 Debian-6
debug1: Checking blacklist file /usr/share/
debug1: Checking blacklist file /etc/ssh/
debug1: private host key: #0 type 0 RSA1
debug3: Not a RSA1 key file /etc/ssh/
debug1: read PEM private key done: type RSA
debug1: Checking blacklist file /usr/share/
debug1: Checking blacklist file /etc/ssh/
debug1: private host key: #1 type 1 RSA
debug3: Not a RSA1 key file /etc/ssh/
debug1: read PEM private key done: type DSA
debug1: Checking blacklist file /usr/share/
debug1: Checking blacklist file /etc/ssh/
debug1: private host key: #2 type 2 DSA
debug1: rexec_argv[
debug1: rexec_argv[
debug1: rexec_argv[
debug3: oom_adjust_setup
Set /proc/self/oom_adj from 0 to -17
debug2: fd 3 setting O_NONBLOCK
debug1: Bind to port 22222 on 0.0.0.0.
Server listening on 0.0.0.0 port 22222.
debug2: fd 4 setting O_NONBLOCK
debug3: sock_set_v6only: set socket 4 IPV6_V6ONLY
debug1: Bind to port 22222 on ::.
Server listening on :: port 22222.
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 637
debug3: ssh_msg_send: type 0
debug3: send_rexec_state: done
debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8
Executing new program: /usr/sbin/sshd
warning: The current binary is a PIE (Position Independent Executable), which
GDB does NOT currently support. Most debugger features will fail if used
in this session.
debug1: inetd sockets after dupping: 3, 3
Connection from 172.28.0.5 port 58160
Did not receive identification string from 172.28.0.5
Program exited with code 0377.
So when logging in, the sshd process is just exiting.