Received message too long 3649413782 at login

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
luc.martens@kbc.be
Posts: 1
Joined: Thu Nov 02, 2017 5:13 am

Received message too long 3649413782 at login

Post by luc.martens@kbc.be »

I'm hitting an issue with login from sftp client (windows command shell or winscp) to z/OS ssh running dovetail sftp server.
Receiving msg : Received message too long 3649413782
in Hex: D985 A296
in EBCDIC: Reso --> looks like Resource ..... but that's a guess

I have been looking in my scripts but there is no write of messages at logon via /etc/profile, so that looks ok.

See below for the logging.
When I logon via winscp, it doesn't work neither. My mainframe portion of the winscp screen hangs.
Running zOS 2.3
Running Co:Z SFTP Server version: 6.2.1 (7.6p1) 2021-01-15

Help is appreciated.
regards Luc


myuser@dummy.be.srv.dev.sys's password:
debug3: send packet: type 50
debug2: we sent a password packet, wait for reply
debug3: receive packet: type 52
debug1: Authentication succeeded (password).
Authenticated to -------------------- ([--------------]:20022).
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
debug3: send packet: type 90
debug1: Requesting no-more-sessions@openssh.com
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug3: receive packet: type 91
debug2: channel_input_open_confirmation: channel 0: callback start
debug2: fd 3 setting TCP_NODELAY
debug2: client_session2_setup: id 0
debug1: Sending subsystem: sftp
debug2: channel 0: request subsystem 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 2097152
debug3: receive packet: type 99
debug2: channel_input_status_confirm: type 99 id 0
debug2: subsystem request accepted on channel 0
Received message too long 3649413782
Ensure the remote shell produces no output for non-interactive sessions.
debug2: channel 0: read<=0 rfd 4 len 0
debug2: channel 0: read failed
debug2: channel 0: close_read
debug2: channel 0: input open -> drain
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: Received message too long 3649413782 at login

Post by dovetail »

This is an indication that something is writing to stdout when the Co:Z SFTP server is being started. Data written to stdout while the sftp-server subsystem is being started by z/OS OpenSSH SSHD will corrupt the sftp packet protocol.

Since the Co:Z SFTP server is started by the shell script <coz>/bin/sftp-server.sh, your site may be writing messages to stdout from:

- either the /etc/ssh/sftp-server.rc or the user $HOME/.ssh/sftp-server.rc script files
- the sftp-server.sh script itself, if you have modified it (please don't)
- the /etc/ssh/sshrc or user $HOME/.ssh/rc file, which is run by z/OS OpenSSH when you log in.

The /etc/profile or user's $HOME/.profile won't be the issue, since these are only for login shells, and the SFTP server subsystem isn't started by a login shell.
Post Reply