Subject: Re: Problem with ssh commands from cron
To: None <netbsd-users@netbsd.org>
From: Christoph Kaegi <kgc@zhwin.ch>
List: netbsd-users
Date: 11/26/2003 08:26:17
On 24.11-10:09, Steven M. Bellovin wrote:
> In message <20031124144219.GC27185@zhwin.ch>, Christoph Kaegi writes:
> >On 24.11-08:58, Steven M. Bellovin wrote:
> >> >
> >> Then I don't have any guesses. You might want to run an sshd on a
> >> different port with debugging on, and see what it says.
> >>
> >
> >When run by cron, sshd stops after the following:
>
> Hmmm... The next obvious step is to turn on client debugging, too.
>
I did this also:
ssh from cron stops here:
-------------------------------------- 8< --------------------------------------
debug2: channel 0: close_read
debug2: channel 0: input open -> drain
debug2: channel 0: ibuf empty
debug2: channel 0: send eof
debug2: channel 0: input drain -> closed
Stopping named.
Waiting for PIDS: 8022.
Starting named.
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
-------------------------------------- 8< --------------------------------------
ssh from console:
-------------------------------------- 8< --------------------------------------
debug2: channel 0: close_read
debug2: channel 0: input open -> drain
debug2: channel 0: ibuf empty
debug2: channel 0: send eof
debug2: channel 0: input drain -> closed
Stopping named.
Waiting for PIDS: 8486.
Starting named.
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: obuf empty
debug2: channel 0: close_write
debug2: channel 0: output drain -> closed
debug2: channel 0: rcvd close
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
Connection to ns4 closed.
debug1: Transferred: stdin 0, stdout 0, stderr 27 bytes in 4.0 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 6.7
debug1: Exit status 0
-------------------------------------- 8< --------------------------------------
The client seems not to receive eof on channel 0.
I also tried to plaster debug("") statements at interesting
places in sshd/session.c in order to find out, where it gets
stuck, but I didn't succeed in finding out.
Another interesting thing is maybe: The ssh client OpenSSH_3.7p1 on
a solaris 8 machine.
Restarting named on another solaris host this way works.
Where it doesn't work is a NetBSD-1.6 Host (sshd version OpenSSH_3.4
NetBSD_Secure_Shell-20030916a).
Chris
--
----------------------------------------------------------------------
Christoph Kaegi kgc@zhwin.ch
----------------------------------------------------------------------