sshd on cygwin: resetowanie połączenia przez peera


3

Zainstalowałem inetutils na moim cygwinie dziś po południu i od tego czasu mój sshd już nie działa. Oto wiadomość od klienta ssh

$ ssh localhost
sh_exchange_identification: read: Connection reset by peer

Jednak podczas gdy zatrzymałem sshd cygrunsrv --stop sshdi napisałem, /usr/sbin/sshd -daby wywołać usługę, działa to dobrze !!

$ /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: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com 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 no-more-sessions@openssh.com 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.

Nie wiem jak prześledzić problem. Czy może być coś nie tak z połączeniem, takim jak iptables? Wygląda na to, że na cygwin nie ma iptables. Jakieś pomysły? Wielkie dzięki!


co mówią ci logi serwera?
Jakuje

Jeśli cygrunsrv --start sshdużywałbyś go zamiast uruchamiać go ręcznie, to czy zadziałałoby? Może to wymagać ponownego uruchomienia.
ams

Mam ten sam problem w systemie Windows 7 Professional. Podgląd zdarzeń systemu Windows pokazuje tylko to, że usługa sshd została uruchomiona. Otrzymuję komunikat „ssh_exchange_identification: read: Connection reset by peer” zarówno podczas próby połączenia lokalnego, jak i zdalnego.
hourback
Korzystając z naszej strony potwierdzasz, że przeczytałeś(-aś) i rozumiesz nasze zasady używania plików cookie i zasady ochrony prywatności.
Licensed under cc by-sa 3.0 with attribution required.