sshd write failed

Rasmus Kaj kaj at kth.se
Sat Jan 28 22:27:41 CET 2012


lör 2012-01-28 klockan 20:07 +0100 skrev jonas.internet at gmail.com:
> >
> > lör 2012-01-28 klockan 19:53 +0100 skrev Rasmus Kaj:
> > > Jag har råkat ut för ett märkligt problem med sshd på FreeBSD 8.2.  När
> > > jag för över större filer säger avbryts kopplingen plötsligt mitt i.

> Kan du få några mer detaljer om du kör ssh-klienten i verbose mode?

Inga jag begriper, men här kommer output från -vvv på klienten.
Därefter output från sshd -ddd som jag också provade.  Kanske du eller
någon annan på listan får ut mer av debugginfon än jag?


Först klienten:

: 1 goldfieldite%; scp -vvv -r lucien.krats.se:/opt/foto/2012/01/22 .
Executing: program /usr/bin/ssh host lucien.krats.se, user
(unspecified), command scp -v -r -f /opt/foto/2012/01/22
OpenSSH_4.3p2, OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008
debug1: Reading configuration data /home/k/a/kaj/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to lucien.krats.se [85.228.223.84] port 22.
debug1: Connection established.
debug1: identity file /home/k/a/kaj/.ssh/identity type 0
debug1: identity file /home/k/a/kaj/.ssh/id_rsa type -1
debug3: Not a RSA1 key file /home/k/a/kaj/.ssh/id_dsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug2: key_type_from_name: unknown key type 'Proc-Type:'
debug3: key_read: missing keytype
debug2: key_type_from_name: unknown key type 'DEK-Info:'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /home/k/a/kaj/.ssh/id_dsa type 2
debug1: loaded 3 keys
debug1: Remote protocol version 2.0, remote software version
OpenSSH_5.4p1 FreeBSD-20100308
debug1: match: OpenSSH_5.4p1 FreeBSD-20100308 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.3
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit:
diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit:
aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc at lysator.liu.se
debug2: kex_parse_kexinit:
aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc at lysator.liu.se
debug2: kex_parse_kexinit:
hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160 at openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit:
hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160 at openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib at openssh.com,zlib
debug2: kex_parse_kexinit: none,zlib at openssh.com,zlib
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: kex_parse_kexinit:
diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit:
aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc at lysator.liu.se
debug2: kex_parse_kexinit:
aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc at lysator.liu.se
debug2: kex_parse_kexinit:
hmac-md5,hmac-sha1,umac-64 at openssh.com,hmac-ripemd160,hmac-ripemd160 at openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit:
hmac-md5,hmac-sha1,umac-64 at openssh.com,hmac-ripemd160,hmac-ripemd160 at openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib at openssh.com
debug2: kex_parse_kexinit: none,zlib at openssh.com
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-ctr hmac-md5 none
debug2: mac_init: found hmac-md5
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 136/256
debug2: bits set: 501/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug3: check_host_in_hostfile: filename /home/k/a/kaj/.ssh/known_hosts2
debug3: check_host_in_hostfile: filename /etc/ssh/ssh_known_hosts2
debug3: check_host_in_hostfile: filename /home/k/a/kaj/.ssh/known_hosts2
debug3: check_host_in_hostfile: filename /etc/ssh/ssh_known_hosts2
debug3: check_host_in_hostfile: filename /home/k/a/kaj/.ssh/known_hosts
debug3: check_host_in_hostfile: match line 81
debug3: check_host_in_hostfile: filename /home/k/a/kaj/.ssh/known_hosts
debug3: check_host_in_hostfile: match line 81
debug1: Host 'lucien.krats.se' is known and matches the RSA host key.
debug1: Found key in /home/k/a/kaj/.ssh/known_hosts:81
debug2: bits set: 516/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/k/a/kaj/.ssh/id_rsa ((nil))
debug2: key: /home/k/a/kaj/.ssh/id_dsa (0x9d92b38)
debug1: Authentications that can continue:
publickey,keyboard-interactive
debug3: start over, passed a different list
publickey,keyboard-interactive
debug3: preferred
gssapi-with-mic,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: Trying private key: /home/k/a/kaj/.ssh/id_rsa
debug3: no such identity: /home/k/a/kaj/.ssh/id_rsa
debug1: Offering public key: /home/k/a/kaj/.ssh/id_dsa
debug3: send_pubkey_test
debug2: we sent a publickey packet, wait for reply
debug1: Authentications that can continue:
publickey,keyboard-interactive
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
debug2: we sent a keyboard-interactive packet, wait for reply
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 1
Password:
debug3: packet_send2: adding 32 (len 22 padlen 10 extra_pad 64)
debug2: input_userauth_info_req
debug2: input_userauth_info_req: num_prompts 0
debug3: packet_send2: adding 48 (len 10 padlen 6 extra_pad 64)
debug1: Authentication succeeded (keyboard-interactive).
debug2: fd 4 setting O_NONBLOCK
debug2: fd 5 setting O_NONBLOCK
debug1: channel 0: new [client-session]
debug3: ssh_session2_open: channel_new: 0
debug2: channel 0: send open
debug1: Entering interactive session.
debug2: callback start
debug2: client_session2_setup: id 0
debug1: Sending environment.
debug3: Ignored env KRB5CCNAME
debug1: Sending env LANG = sv_SE.utf8
debug2: channel 0: request env confirm 0
debug3: Ignored env USER
debug3: Ignored env LOGNAME
debug3: Ignored env HOME
debug3: Ignored env PATH
debug3: Ignored env MAIL
debug3: Ignored env SHELL
debug3: Ignored env SSH_CLIENT
debug3: Ignored env SSH_CONNECTION
debug3: Ignored env SSH_TTY
debug3: Ignored env TERM
debug3: Ignored env SHLVL
debug3: Ignored env PWD
debug3: Ignored env OLDPWD
debug3: Ignored env TMPDIR
debug3: Ignored env CVS_RSH
debug3: Ignored env ENSCRIPT
debug3: Ignored env HOSTNAME
debug3: Ignored env HISTSIZE
debug3: Ignored env INPUTRC
debug3: Ignored env ALLIANCE_TOP
debug3: Ignored env MBK_IN_LO
debug3: Ignored env MBK_OUT_LO
debug3: Ignored env MBK_IN_PH
debug3: Ignored env MBK_OUT_PH
debug3: Ignored env MBK_WORK_LIB
debug3: Ignored env MBK_CATAL_NAME
debug3: Ignored env MBK_SCALE_X
debug3: Ignored env VH_MAXERR
debug3: Ignored env VH_BEHSFX
debug3: Ignored env VH_PATSFX
debug3: Ignored env VH_DLYSFX
debug3: Ignored env MBK_VDD
debug3: Ignored env MBK_VSS
debug3: Ignored env MBK_CATA_LIB
debug3: Ignored env MBK_TARGET_LIB
debug3: Ignored env MBK_C4_LIB
debug3: Ignored env XPAT_PARAM_NAME
debug3: Ignored env XFSM_PARAM_NAME
debug3: Ignored env XSCH_PARAM_NAME
debug3: Ignored env RDS_IN
debug3: Ignored env RDS_OUT
debug3: Ignored env DREAL_TECHNO_NAME
debug3: Ignored env GRAAL_TECHNO_NAME
debug3: Ignored env GENVIEW_TECHNO_NAME
debug3: Ignored env RDS_TECHNO_NAME
debug3: Ignored env ELP_TECHNO_NAME
debug3: Ignored env LD_LIBRARY_PATH
debug3: Ignored env MANPATH
debug3: Ignored env MBK_SPI_MODEL
debug3: Ignored env LS_COLORS
debug3: Ignored env CUPS_SERVER
debug3: Ignored env G_BROKEN_FILENAMES
debug3: Ignored env SSH_ASKPASS
debug3: Ignored env KDE_IS_PRELINKED
debug3: Ignored env KDE_NO_IPV6
debug3: Ignored env KDEDIR
debug3: Ignored env EDITOR
debug3: Ignored env VISUAL
debug3: Ignored env GCONF_LOCAL_LOCKS
debug3: Ignored env MAILHOST
debug3: Ignored env EMAIL
debug3: Ignored env LESSOPEN
debug3: Ignored env INFOPATH
debug3: Ignored env MODULESHOME
debug3: Ignored env LOADEDMODULES
debug3: Ignored env MODULEPATH
debug3: Ignored env _LMFILES_
debug3: Ignored env TEXINPUTS
debug3: Ignored env TEXINPUTS_NODEFAULT
debug3: Ignored env WMMENUPATH
debug3: Ignored env XUSERFILESEARCHPATH
debug3: Ignored env QTDIR
debug3: Ignored env QTINC
debug3: Ignored env QTLIB
debug3: Ignored env XAUTHORITY
debug3: Ignored env _
debug1: Sending command: scp -v -r -f /opt/foto/2012/01/22
debug2: channel 0: request exec confirm 0
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel 0: rcvd adjust 2097152
debug2: channel 0: rcvd ext data 31
Entering directory: D0775 0 22
debug2: channel 0: written 31 to efd 6
Sink: D0775 0 22
debug2: channel 0: rcvd ext data 47
Sending file modes: C0644 3961456 IMGP2442.JPG
debug2: channel 0: written 47 to efd 6
Sink: C0644 3961456 IMGP2442.JPG
IMGP2442.JPG                                    0%    0     0.0KB/s
--:-- ETAdebug2: channel 0: window 1998732 sent adjust 98420
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 fd 4/5 cfd -1)

debug3: channel 0: close_fds r 4 w 5 e 6 c -1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
Connection to lucien.krats.se closed by remote host.
debug1: Transferred: stdin 0, stdout 0, stderr 54 bytes in 0.3 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 171.3
debug1: Exit status -1
lost connection


... och här kommer servern:

debug3: PAM: sshpam_query entering
debug3: ssh_msg_recv entering
debug1: do_pam_account: called
debug3: PAM: do_pam_account pam_acct_mgmt = 0 (success)
debug3: ssh_msg_send: type 0
debug3: PAM: import_environments entering
debug3: sshpam_password_change_required 0
debug3: PAM: num env strings 0
debug1: PAM: num PAM env strings 0
debug3: mm_request_send entering: type 51
debug3: mm_request_receive entering
debug3: mm_sshpam_query: pam_query returned 0
Postponed keyboard-interactive/pam for kaj from 130.237.48.174 port
56405 ssh2
debug3: mm_sshpam_respond
debug3: mm_request_send entering: type 52
debug3: mm_sshpam_respond: waiting for MONITOR_ANS_PAM_RESPOND
debug3: monitor_read: checking request 52
debug3: mm_request_receive_expect entering: type 53
debug3: mm_answer_pam_respond
debug3: mm_request_receive entering
debug2: PAM: sshpam_respond entering, 0 responses
debug3: mm_request_send entering: type 53
debug3: mm_sshpam_respond: pam_respond returned 0
debug3: mm_request_receive entering
debug3: mm_sshpam_free_ctx
debug3: mm_request_send entering: type 54
debug3: mm_sshpam_free_ctx: waiting for MONITOR_ANS_PAM_FREE_CTX
debug3: mm_request_receive_expect entering: type 55
debug3: monitor_read: checking request 54
debug3: mm_request_receive entering
debug3: mm_answer_pam_free_ctx
debug3: PAM: sshpam_free_ctx entering
debug3: PAM: sshpam_thread_cleanup entering
debug3: mm_request_send entering: type 55
debug2: monitor_read: 54 used once, disabling now
debug3: mm_do_pam_account entering
debug3: mm_request_receive_expect entering: type 46
debug3: mm_request_send entering: type 46
debug3: mm_request_receive entering
debug3: mm_request_receive_expect entering: type 47
debug1: do_pam_account: called
debug3: mm_request_receive entering
debug3: mm_request_send entering: type 47
Accepted keyboard-interactive/pam for kaj from 130.237.48.174 port 56405
ssh2
debug1: monitor_child_preauth: kaj has been authenticated by privileged
process
debug3: mm_get_keystate: Waiting for new keys
debug3: mm_do_pam_account returning 1
debug3: mm_request_receive_expect entering: type 24
debug3: mm_request_receive entering
debug3: mm_send_keystate: Sending new keys: 0x801e53480 0x801e53300
debug3: mm_newkeys_to_blob: converting 0x801e53480
debug3: mm_newkeys_to_blob: converting 0x801e53300
debug3: mm_send_keystate: New keys have been sent
debug3: mm_send_keystate: Sending compression state
debug3: mm_request_send entering: type 24
debug3: mm_send_keystate: Finished sending state
debug3: mm_newkeys_from_blob: 0x801e0f880(122)
debug2: mac_setup: found hmac-md5
debug3: mm_get_keystate: Waiting for second key
debug3: mm_newkeys_from_blob: 0x801e0f880(122)
debug2: mac_setup: found hmac-md5
debug3: mm_get_keystate: Getting compression state
debug3: mm_get_keystate: Getting Network I/O buffers
debug3: mm_share_sync: Share sync
debug3: mm_share_sync: Share sync end
debug1: PAM: establishing credentials
debug3: PAM: opening session
User child is on pid 2224
debug3: mm_request_receive entering
debug1: PAM: establishing credentials
debug2: set_newkeys: mode 0
debug2: set_newkeys: mode 1
debug1: Entering interactive session for SSH2.
debug2: fd 5 setting O_NONBLOCK
debug2: fd 6 setting O_NONBLOCK
debug1: server_init_dispatch_20
debug1: server_input_channel_open: ctype session rchan 0 win 2097152 max
32768
debug1: input_session_request
debug1: channel 0: new [server-session]
debug2: session_new: allocate (allocated 0 max 10)
debug3: session_unused: session id 0 unused
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 env reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req env
debug2: Ignoring env request LANG: disallowed name
debug1: server_input_channel_req: channel 0 request exec reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req exec
debug3: mm_audit_run_command entering command scp -v -r
-f /opt/foto/2012/01/22
debug3: mm_request_send entering: type 57
debug3: monitor_read: checking request 57
debug3: mm_answer_audit_command entering
debug3: mm_request_receive entering
debug2: fd 3 setting TCP_NODELAY
debug2: fd 9 setting O_NONBLOCK
debug2: fd 8 setting O_NONBLOCK
debug2: fd 11 setting O_NONBLOCK
debug2: channel 0: read 133 from efd 11
debug2: channel 0: rwin 2097152 elen 133 euse 1
debug2: channel 0: sent ext data 133
debug2: channel 0: read 502 from efd 11
debug2: channel 0: rwin 2097019 elen 502 euse 1
debug2: channel 0: sent ext data 502
debug2: channel 0: read 31 from efd 11
debug2: channel 0: rwin 2096517 elen 31 euse 1
debug2: channel 0: sent ext data 31
debug2: channel 0: read 47 from efd 11
debug2: channel 0: rwin 2096448 elen 47 euse 1
debug2: channel 0: sent ext data 47
Write failed: Permission denied
debug1: do_cleanup
debug3: PAM: sshpam_thread_cleanup entering
debug1: do_cleanup
debug1: PAM: cleanup
debug1: PAM: closing session
debug1: PAM: deleting credentials
debug3: PAM: sshpam_thread_cleanup entering

// Rasmus



More information about the BUS mailing list