NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Strange ssh hangups, netbsd-9 GENERIC



On 3/12/21 3:43 AM, RVP wrote:
On Thu, 11 Mar 2021, Louis Guillaume wrote:

I have a netbsd-9 machine that is exhibiting some weird behavior with ssh:
...
When a bunch of data are sent to the terminal at once the session quits unexpectedly. I can't run a "dmesg" or even read a man page without it hanging up.


Are you sure that this is not a server-side bug? What server software
is it?


OpenSSH_8.0 NetBSD_Secure_Shell-20190418-hpn13v14-lpk, OpenSSL 1.1.1g 21 Apr 2020


It seems the only significant debug statement I see is "debug3: fd 1 is
not  O_NONBLOCK".


That's a std message.

Can you run this command and then check if out.bin is exactly 1MB, and also
post ssh.log.txt?

ssh -vvv user%ser.ver@localhost 'dd if=/dev/zero bs=1m count=1 2>/dev/null' >out.bin 2>ssh.log.txt


Actually out.bin is 0b after running that - but it doesn't surprise me. Would it actually send text to stdout for each \0 returned by dd? Seems like it would basically be an empty string. The stderr is below. Thanks for looking!

--
Louis

OpenSSH_8.1p1, LibreSSL 2.7.3
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 47: Applying options for *
debug1: Connecting to [server] port 22.
debug1: Connection established.
debug1: identity file /Users/louis/.ssh/id_rsa type 0
debug1: identity file /Users/louis/.ssh/id_rsa-cert type -1
debug1: identity file /Users/louis/.ssh/id_dsa type 1
debug1: identity file /Users/louis/.ssh/id_dsa-cert type -1
debug1: identity file /Users/louis/.ssh/id_ecdsa type -1
debug1: identity file /Users/louis/.ssh/id_ecdsa-cert type -1
debug1: identity file /Users/louis/.ssh/id_ed25519 type 3
debug1: identity file /Users/louis/.ssh/id_ed25519-cert type -1
debug1: identity file /Users/louis/.ssh/id_xmss type -1
debug1: identity file /Users/louis/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.1
debug1: Remote protocol version 2.0, remote software version OpenSSH_8.0 NetBSD_Secure_Shell-20190418-hpn13v14-lpk debug1: match: OpenSSH_8.0 NetBSD_Secure_Shell-20190418-hpn13v14-lpk pat OpenSSH* compat 0x04000000
debug3: fd 5 is O_NONBLOCK
debug1: Authenticating to [server]:22 as 'louis'
debug3: hostkeys_foreach: reading file "/Users/louis/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file /Users/louis/.ssh/known_hosts:173
debug3: load_hostkeys: loaded 1 keys from [server]
debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01%openssh.com@localhost,ecdsa-sha2-nistp384-cert-v01%openssh.com@localhost,ecdsa-sha2-nistp521-cert-v01%openssh.com@localhost,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256%libssh.org@localhost,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c debug2: host key algorithms: ecdsa-sha2-nistp256-cert-v01%openssh.com@localhost,ecdsa-sha2-nistp384-cert-v01%openssh.com@localhost,ecdsa-sha2-nistp521-cert-v01%openssh.com@localhost,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519-cert-v01%openssh.com@localhost,rsa-sha2-512-cert-v01%openssh.com@localhost,rsa-sha2-256-cert-v01%openssh.com@localhost,ssh-rsa-cert-v01%openssh.com@localhost,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa debug2: ciphers ctos: chacha20-poly1305%openssh.com@localhost,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm%openssh.com@localhost,aes256-gcm%openssh.com@localhost debug2: ciphers stoc: chacha20-poly1305%openssh.com@localhost,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm%openssh.com@localhost,aes256-gcm%openssh.com@localhost debug2: MACs ctos: umac-64-etm%openssh.com@localhost,umac-128-etm%openssh.com@localhost,hmac-sha2-256-etm%openssh.com@localhost,hmac-sha2-512-etm%openssh.com@localhost,hmac-sha1-etm%openssh.com@localhost,umac-64%openssh.com@localhost,umac-128%openssh.com@localhost,hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: MACs stoc: umac-64-etm%openssh.com@localhost,umac-128-etm%openssh.com@localhost,hmac-sha2-256-etm%openssh.com@localhost,hmac-sha2-512-etm%openssh.com@localhost,hmac-sha1-etm%openssh.com@localhost,umac-64%openssh.com@localhost,umac-128%openssh.com@localhost,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib%openssh.com@localhost,zlib
debug2: compression stoc: none,zlib%openssh.com@localhost,zlib
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256%libssh.org@localhost,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1 debug2: host key algorithms: rsa-sha2-512,rsa-sha2-256,ssh-rsa,ecdsa-sha2-nistp521,ssh-ed25519 debug2: ciphers ctos: chacha20-poly1305%openssh.com@localhost,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm%openssh.com@localhost,aes256-gcm%openssh.com@localhost debug2: ciphers stoc: chacha20-poly1305%openssh.com@localhost,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm%openssh.com@localhost,aes256-gcm%openssh.com@localhost debug2: MACs ctos: umac-64-etm%openssh.com@localhost,umac-128-etm%openssh.com@localhost,hmac-sha2-256-etm%openssh.com@localhost,hmac-sha2-512-etm%openssh.com@localhost,hmac-sha1-etm%openssh.com@localhost,umac-64%openssh.com@localhost,umac-128%openssh.com@localhost,hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: MACs stoc: umac-64-etm%openssh.com@localhost,umac-128-etm%openssh.com@localhost,hmac-sha2-256-etm%openssh.com@localhost,hmac-sha2-512-etm%openssh.com@localhost,hmac-sha1-etm%openssh.com@localhost,umac-64%openssh.com@localhost,umac-128%openssh.com@localhost,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib%openssh.com@localhost
debug2: compression stoc: none,zlib%openssh.com@localhost
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp521
debug1: kex: server->client cipher: chacha20-poly1305%openssh.com@localhost MAC: <implicit> compression: none debug1: kex: client->server cipher: chacha20-poly1305%openssh.com@localhost MAC: <implicit> compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: Server host key: ecdsa-sha2-nistp521 SHA256:+U5E0dudTazZBiKjXOGVmF1qsRGWZSv4+A9Id31ICBY
debug3: hostkeys_foreach: reading file "/Users/louis/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file /Users/louis/.ssh/known_hosts:173
debug3: load_hostkeys: loaded 1 keys from [server]
debug3: hostkeys_foreach: reading file "/Users/louis/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file /Users/louis/.ssh/known_hosts:173
debug3: load_hostkeys: loaded 1 keys from 192.168.1.2
debug1: Host '[server]' is known and matches the ECDSA host key.
debug1: Found key in /Users/louis/.ssh/known_hosts:173
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey in after 134217728 blocks
debug1: Skipping ssh-dss key /Users/louis/.ssh/id_dsa - not in PubkeyAcceptedKeyTypes
debug1: Will attempt key: /Users/louis/.ssh/id_rsa RSA SHA256:[key]
debug1: Will attempt key: /Users/louis/.ssh/id_ecdsa
debug1: Will attempt key: /Users/louis/.ssh/id_ed25519 ED25519 SHA256:[key]
debug1: Will attempt key: /Users/louis/.ssh/id_xmss
debug2: pubkey_prepare: done
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-xmss%openssh.com@localhost,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password,keyboard-interactive debug3: start over, passed a different list publickey,password,keyboard-interactive
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: /Users/louis/.ssh/id_rsa RSA SHA256:[key]
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Trying private key: /Users/louis/.ssh/id_ecdsa
debug3: no such identity: /Users/louis/.ssh/id_ecdsa: No such file or directory debug1: Offering public key: /Users/louis/.ssh/id_ed25519 ED25519 SHA256:[key]
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Trying private key: /Users/louis/.ssh/id_xmss
debug3: no such identity: /Users/louis/.ssh/id_xmss: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup keyboard-interactive
debug3: remaining preferred: password
debug3: authmethod_is_enabled keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug2: userauth_kbdint
debug3: send packet: type 50
debug2: we sent a keyboard-interactive packet, wait for reply
debug3: receive packet: type 60
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 1
debug3: send packet: type 61
debug3: receive packet: type 60
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 0
debug3: send packet: type 61
debug3: receive packet: type 52
debug1: Authentication succeeded (keyboard-interactive).
Authenticated to [server] ([192.168.1.2]:22).
debug2: fd 7 setting O_NONBLOCK
debug2: fd 8 setting O_NONBLOCK
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug3: send packet: type 90
debug1: Requesting no-more-sessions%openssh.com@localhost
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug3: receive packet: type 80
debug1: client_input_global_request: rtype hostkeys-00%openssh.com@localhost want_reply 0
debug3: receive packet: type 91
debug2: channel_input_open_confirmation: channel 0: callback start
debug2: fd 5 setting TCP_NODELAY
debug3: ssh_packet_set_tos: set IP_TOS 0x20
debug2: client_session2_setup: id 0
debug1: Sending environment.
debug3: Ignored env _
debug3: Ignored env ECLIPSE_HOME
debug3: Ignored env GRAILS_HOME
debug3: Ignored env HISTFILE
debug3: Ignored env HOME
debug1: Sending env LANG = en_US.UTF-8
debug2: channel 0: request env confirm 0
debug3: send packet: type 98
debug3: Ignored env LOGNAME
debug3: Ignored env LaunchInstanceID
debug3: Ignored env MANPATH
debug3: Ignored env PATH
debug3: Ignored env PWD
debug3: Ignored env SECURITYSESSIONID
debug3: Ignored env SHELL
debug3: Ignored env SHLVL
debug3: Ignored env SSH_AUTH_SOCK
debug3: Ignored env SVN_EDITOR
debug3: Ignored env TERM
debug3: Ignored env TERM_PROGRAM
debug3: Ignored env TERM_PROGRAM_VERSION
debug3: Ignored env TERM_SESSION_ID
debug3: Ignored env TMPDIR
debug3: Ignored env USER
debug3: Ignored env XPC_FLAGS
debug3: Ignored env XPC_SERVICE_NAME
debug3: Ignored env A__z
debug3: Ignored env __CF_USER_TEXT_ENCODING
debug1: Sending command: dd if=/dev/zero bs=1m count=1 2>/dev/null
debug2: channel 0: request exec confirm 1
debug3: send packet: type 98
debug2: channel_input_open_confirmation: channel 0: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 32768
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: exec request accepted on channel 0
debug3: send packet: type 1
debug1: channel 0: free: client-session, nchannels 1
debug3: channel 0: status: The following connections are open:
  #0 client-session (t4 r0 i0/0 o0/0 e[write]/0 fd 6/7/8 sock -1 cc -1)

debug3: fd 1 is not O_NONBLOCK
debug1: fd 2 clearing O_NONBLOCK
Connection to [server] closed by remote host.
Transferred: sent 2472, received 2728 bytes, in 1.4 seconds
Bytes per second: sent 1820.2, received 2008.7
debug1: Exit status -1


Home | Main Index | Thread Index | Old Index