ssh batch troubles

Martijn van Oosterhout kleptog at svana.org
Wed Dec 11 22:58:22 EST 2002


On Wed, Dec 11, 2002 at 09:38:36PM +1100, Howard Lowndes wrote:
> On Wed, 11 Dec 2002, Damien Elmes wrote:
> > Hangs? Try hit: [RET] ~ .
> >
> > If it terminates fine there, then the command is probably opening standard
> > output/error and forking to the background. SSH keeps the connection open
> > incase there's any future output. Try redirecting it to /dev/null instead.
> 
> I've tried redirecting stdin to </dev/null and to <&-  but neither make
> any difference.

A better way to do this is using the -f switch. That way ssh won't even open
up the stdin/out pipes.

> I'm wondering if it's something on the remote box's sshd as that was
> recently upgraded and sshd might be broken when a local cron script tries
> to run ssh to send a command to the remote box; it just doesn't seem to
> send enough back to the local box to tell it to close the ssh connection.
> The difficulty is that ssh works fine from the command line.

Very strange. Can you login on another connection and strace the process to
see what it's stuck on?
-- 
Martijn van Oosterhout   <kleptog at svana.org>   http://svana.org/kleptog/
> Support bacteria! They're the only culture some people have.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://lists.samba.org/archive/linux/attachments/20021211/3fe25446/attachment.bin


More information about the linux mailing list