SSHD terminates

Discussion of Co:Z sftp, a port of OpenSSH sftp for z/OS
Post Reply
PaulB42
Posts: 27
Joined: Fri Aug 21, 2009 5:32 am

SSHD terminates

Post by PaulB42 »

Apologies if this isn't a Co:Z SFTP problem but all the SSH experts seem to hang out here :)

I am setting up SSHD with Co:Z SFTP (2.1.1). No problem with outbound transfers from the mainframe, and finally after much battling with Top Secret, I think we can transfer files from Windows to the mainframe.

The problem is, that when the end user terminates the SSH session, the SSHD started task running on the m/f terminates. There are no messages on the console to alert us, it just disappears, and I am continually restarting it. This must be a simple setting somewhere, but I have set up SSHD exactly the same as on other systems and the problem only occurrs on this one.

Here is the bottom of the sshd.log
subsystem request for sftp.
debug1: subsystem: exec() /usr/lpp/coz/bin/sftp-server.sh.
debug3: do_exec: subsystem 1.
debug3: do_exec: passwd name=TSGSFTP, uid=1019, gid=20, dir=/u/TSGSFTP, s
debug3: do_exec_no_pty: no JSCBAUTH propagation to child.
debug2: fd 3 setting TCP_NODELAY.
debug2: fd 10 setting O_NONBLOCK.
debug2: fd 9 setting O_NONBLOCK.
debug3: zsshCloseOldDev: fd=-1.
Received disconnect from 10.93.***.***: 11: User exit.
debug1: do_cleanup.
debug3: zsshCloseOldDev: fd=-1.
dovetail
Site Admin
Posts: 2023
Joined: Thu Jul 29, 2004 12:12 pm

Re: SSHD terminates

Post by dovetail »

This problem would seem to be an issue with the setup of the SSHD daemon; likely a security problem.

My suggestions:
1) Review the Ported Tools OpenSSH User's Guide Ch 5: "Setting up the sshd daemon"

2) Make sure that you can reproduce the problem if your sshd_config's sftp subsystem points to IBM's sftp-server:

Subsystem sftp /usr/lib/ssh/sftp-server

Let us know if it is not reproducible without using Co:Z sftp server.
Otherwise you will have to contact IBM for support.

If you find the problem, please post what you found.
PaulB42
Posts: 27
Joined: Fri Aug 21, 2009 5:32 am

Re: SSHD terminates

Post by PaulB42 »

IBM pointed out something that I hadn't spotted in the ported tools manual.
I had specified the '-d' option in the SSHD proc to get some diagnostics. However, as documented this terminates the daemon after 1 conenction and is only intended for debugging. Removing it resolved the issue
dovetail
Site Admin
Posts: 2023
Joined: Thu Jul 29, 2004 12:12 pm

Re: SSHD terminates

Post by dovetail »

Ahh! Yes, that would do it!

Thanks for following up with your solution.
Post Reply