On 5/8/06, Tzafrir Cohen <[EMAIL PROTECTED]> wrote:
On Mon, May 08, 2006 at 11:09:08AM +0200, Maxim Vexler wrote:
> Hi list
>

If not, start a separate sshd in debug mode on the server and connect to
it.


sshd seems to shade some light on the subject

<<<
# /usr/sbin/sshd -D -d -p PORT+1
debug1: sshd version OpenSSH_4.0p1
debug1: read PEM private key done: type RSA
debug1: private host key: #0 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #1 type 2 DSA
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-D'
debug1: rexec_argv[2]='-d'
debug1: rexec_argv[3]='-p'
debug1: rexec_argv[4]='PORT+1'
debug1: Bind to port PORT+1 on 0.0.0.0.
Server listening on 0.0.0.0 port PORT+1.
socket: Address family not supported by protocol
debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 4 out 4 newsock 4 pipe -1 sock 7
debug1: inetd sockets after dupping: 3, 3
Connection from 62.x.y.z port 4217
debug1: Client protocol version 2.0; client software version OpenSSH_4.0
debug1: match: OpenSSH_4.0 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.0
debug1: permanently_set_uid: 74/74
debug1: list_hostkey_types: ssh-rsa,ssh-dss
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST received
debug1: SSH2_MSG_KEX_DH_GEX_GROUP sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_INIT
debug1: SSH2_MSG_KEX_DH_GEX_REPLY sent
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: KEX done
debug1: userauth-request for user root service ssh-connection method none
debug1: attempt 0 failures 0
debug1: PAM: initializing for "root"
Failed none for root from 62.x.y.z port 4217 ssh2
debug1: PAM: setting PAM_RHOST to "62-x-y-z.barak.net.il"
debug1: PAM: setting PAM_TTY to "ssh"
debug1: userauth-request for user root service ssh-connection method publickey
debug1: attempt 1 failures 1
debug1: test whether pkalg/pkblob are acceptable
debug1: temporarily_use_uid: 0/0 (e=0/0)
debug1: trying public key file /root/.ssh/authorised_keys
debug1: matching key found: file /root/.ssh/authorised_keys, line 1
Found matching RSA key: S:O:R:R:Y
debug1: restore_uid: 0/0
Postponed publickey for root from 62.x.y.z port 4217 ssh2
debug1: userauth-request for user root service ssh-connection method publickey
debug1: attempt 2 failures 1
debug1: temporarily_use_uid: 0/0 (e=0/0)
debug1: trying public key file /root/.ssh/authorised_keys
debug1: matching key found: file /root/.ssh/authorised_keys, line 1
Found matching RSA key: S:O:R:R:Y
debug1: restore_uid: 0/0
debug1: ssh_rsa_verify: signature correct
debug1: do_pam_account: called
Accepted publickey for root from 62.x.y.z port 4217 ssh2
Accepted publickey for root from 62.x.y.z port 4217 ssh2
debug1: monitor_child_preauth: root has been authenticated by privileged process
debug1: Entering interactive session for SSH2.
debug1: server_init_dispatch_20
debug1: server_input_channel_open: ctype session rchan 0 win 65536 max 16384
debug1: input_session_request
debug1: channel 0: new [server-session]
debug1: session_new: init
debug1: session_new: session 0
debug1: session_open: channel 0
debug1: session_open: session 0: link with channel 0
debug1: server_input_channel_open: confirm session
debug1: server_input_channel_req: channel 0 request pty-req reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req pty-req
debug1: Allocating pty.
debug1: session_pty_req: session 0 alloc /dev/pts/12
debug1: server_input_channel_req: channel 0 request shell reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req shell
debug1: PAM: setting PAM_TTY to "/dev/pts/12"
debug1: PAM: establishing credentials
debug1: Setting controlling tty using TIOCSCTTY.
debug1: Received SIGCHLD.
debug1: session_by_pid: pid 9086
debug1: session_exit_message: session 0 channel 0 pid 9086
debug1: session_exit_message: release channel 0
debug1: session_close: session 0 pid 9086
debug1: session_pty_cleanup: session 0 release /dev/pts/12
syslogin_perform_logout: logout() returned an error
debug1: channel 0: free: server-session, nchannels 1
Connection closed by 62.x.y.z
debug1: do_cleanup
debug1: PAM: cleanup
Closing connection to 62.x.y.z
debug1: PAM: cleanup


It can't for some reason allocate a tty on the server ?!
Then why is it not failing when I do password authentication ?

/var/log/messages - Nothing interesting.
/var/log/secure - Not much either :

May  8 03:09:44 ipp105 sshd[9044]: syslogin_perform_logout: logout()
returned an error
May  8 03:19:03 ipp105 sshd[9070]: Accepted publickey for root from
62.x.y.z port 4759 ssh2
May  8 03:19:03 ipp105 sshd[9070]: syslogin_perform_logout: logout()
returned an error
May  8 03:27:09 ipp105 sshd[9090]: Accepted publickey for root from
62.x.y.z port 4219 ssh2
May  8 03:27:09 ipp105 sshd[9090]: syslogin_perform_logout: logout()
returned an error
May  8 03:28:05 ipp105 sshd[9093]: Accepted publickey for root from
62.x.y.z port 2337 ssh2
May  8 03:28:06 ipp105 sshd[9093]: syslogin_perform_logout: logout()
returned an error
May  8 03:28:15 ipp105 sshd[9096]: Accepted publickey for root from
62.x.y.z port 1589 ssh2
May  8 03:28:16 ipp105 sshd[9096]: syslogin_perform_logout: logout()
returned an error
May  8 03:35:12 ipp105 sshd[9105]: Accepted publickey for root from
62.x.y.z port 4522 ssh2
May  8 03:35:12 ipp105 sshd[9105]: syslogin_perform_logout: logout()
returned an error
May  8 03:35:25 ipp105 sshd[9108]: Accepted publickey for root from
62.x.y.z port 4183 ssh2

--
Cheers,
Maxim Vexler

"Free as in Freedom" - Do u GNU ?

Reply via email to