cron/ssh read failed

From: Samuel E. LaSala (lasalas_at_mail.montclair.edu)
Date: 06/30/04


Date: 29 Jun 2004 19:23:59 -0700

Using openssh on Mac OS X (OpenSSH_3.6.1p1+CAN-2003-0693) I'm trying
to execute a command which generates a large amount of ouput on a
remote openVMS server (F-Secure SSH 3.2.0 (build 7) on OpenVMS-AXP).

When I run the ssh command from the command line, it works fine.
However, when I try to run the ssh command as a cron job, it hangs.

Looking at the verbose output, the main difference seems to be that
the cron job case sets an extra "fd" and a read from "fd 5" fails.

Can someone explain what the extra "fd" is and what might be causing
the read failure.

Thanks.

When run from command line:
...
debug1: Authentication succeeded (publickey).
debug1: fd 5 setting O_NONBLOCK
debug2: fd 6 is 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: ssh_session2_setup: id 0
debug1: Sending command: TYPE BIGFILE.TXT
debug1: channel 0: request exec
debug2: callback done
debug1: channel 0: open confirm rwindow 100000 rmax 32768
...

When run as a cron job:
...
debug1: Authentication succeeded (publickey).
debug1: fd 5 setting O_NONBLOCK
debug1: fd 6 setting O_NONBLOCK
debug2: fd 7 is 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: ssh_session2_setup: id 0
debug1: Sending command: TYPE BIGFILE.TXT
debug1: channel 0: request exec
debug2: callback done
debug1: channel 0: open confirm rwindow 100000 rmax 32768
debug1: channel 0: read<=0 rfd 5 len 0
debug1: channel 0: read failed
debug1: channel 0: close_read
debug1: channel 0: input open -> drain
debug1: channel 0: ibuf empty
debug1: channel 0: send eof
debug1: channel 0: input drain -> closed
...

Samuel E. LaSala
lasalas@mail.montclair.edu



Relevant Pages

  • Re: ssh xterm -> HPUX fails
    ... debug1: read PEM private key done: type RSA ... debug3: preauth child monitor started ... debug2: monitor_read: 0 used once, ... debug2: channel 0: sent ext data 106 ...
    (comp.security.ssh)
  • openssh3.7p1 chroot patch not work on solaris 7
    ... debug1: monitor_child_preauth: test has been authenticated by privileged process ... debug3: mm_get_keystate: Waiting for new keys ... debug2: mac_init: found hmac-sha1 ... debug1: channel 0: new ...
    (comp.security.ssh)
  • openssh3.7p1 chroot patch not work on solaris 7
    ... debug1: monitor_child_preauth: test has been authenticated by privileged process ... debug3: mm_get_keystate: Waiting for new keys ... debug2: mac_init: found hmac-sha1 ... debug1: channel 0: new ...
    (comp.security.ssh)
  • SSH works but SFtp does not work
    ... # This is the sshd server system-wide configuration file. ... debug1: read PEM private key done: type RSA ... debug2: bits set: 512/1024 ... debug1: session_open: channel 0 ...
    (comp.os.qnx)
  • SSH works but SFtp does not work
    ... # This is the sshd server system-wide configuration file. ... debug1: read PEM private key done: type RSA ... debug2: bits set: 512/1024 ... debug1: session_open: channel 0 ...
    (comp.security.ssh)