cygwin 上的 sshd:对等端重置连接

cygwin 上的 sshd:对等端重置连接

今天下午我在 cygwin 上安装了 inetutils,从那时起我的 sshd 就不再工作了。以下是来自 ssh 客户端的消息

$ ssh localhost
sh_exchange_identification: read: Connection reset by peer

但是,当我停止 sshdcygrunsrv --stop sshd并键入/usr/sbin/sshd -d以调用该服务时,它运行良好!!

$ /usr/sbin/sshd.exe -d
debug1: sshd version OpenSSH_7.2, OpenSSL 1.0.2g  1 Mar 2016
debug1: private host key #0: ssh-rsa SHA256:Rz3HKh2PjpOcKyX8sjyMGhb/Q1vDfL91thgvDR2HNZk
debug1: private host key #1: ssh-dss SHA256:DactSa4Y4tyqA0zs6qhDEK8hKfBAot3GU/Ed2zlnR+w
debug1: private host key #2: ecdsa-sha2-nistp256 SHA256:Pxf9wMqGnt5WR45elqFiL//RlmWITyM93XLu/kiw8Mg
debug1: private host key #3: ssh-ed25519 SHA256:6VkIIMYwB7DsAUZHvE0XQPpD9k2a8TfKlbOmX3Ij6ZM
debug1: rexec_argv[0]='/usr/sbin/sshd'
debug1: rexec_argv[1]='-d'
debug1: Bind to port 22 on ::.
Server listening on :: port 22.
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
debug1: fd 5 clearing O_NONBLOCK
debug1: Server will not fork when running in debugging mode.
debug1: rexec start in 5 out 5 newsock 5 pipe -1 sock 8
debug1: inetd sockets after dupping: 3, 3
Connection from ::1 port 5242 on ::1 port 22
debug1: Client protocol version 2.0; client software version OpenSSH_7.2
debug1: match: OpenSSH_7.2 pat OpenSSH* compat 0x04000000
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2
debug1: list_hostkey_types: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_INIT
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS received
debug1: KEX done
debug1: userauth-request for user rilakkris service ssh-connection method none
debug1: attempt 0 failures 0
Failed none for rilakkris from ::1 port 5242 ssh2
debug1: userauth-request for user rilakkris service ssh-connection method keyboard-interactive
debug1: attempt 1 failures 0
debug1: keyboard-interactive devs
debug1: auth2_challenge: user=rilakkris devs=
debug1: kbdint_alloc: devices ''
Failed keyboard-interactive for rilakkris from ::1 port 5242 ssh2
debug1: userauth-request for user rilakkris service ssh-connection method password
debug1: attempt 2 failures 1
Accepted password for rilakkris from ::1 port 5242 ssh2
debug1: Entering interactive session for SSH2.
debug1: server_init_dispatch_20
debug1: server_input_channel_open: ctype session rchan 0 win 1048576 max 16384
debug1: input_session_request
debug1: channel 0: new [server-session]
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_global_request: rtype [email protected] want_reply 0
debug1: server_input_channel_req: channel 0 request pty-req reply 1
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/pty2
debug1: server_input_channel_req: channel 0 request shell reply 1
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req shell
Starting session: shell on pty2 for rilakkris from ::1 port 5242 id 0
debug1: Setting controlling tty using TIOCSCTTY.

我不知道如何追踪问题。iptables 之类的连接可能出了问题吗?看起来 cygwin 上没有 iptables。有什么想法吗?非常感谢!

相关内容