ssh batch troubles

Damien Elmes clug at repose.cx
Wed Dec 11 20:48:38 EST 2002


Howard Lowndes <lannet at lannet.com.au> writes:

> I am having problems running ssh in a batch job, specifically a cron
> script.  I am trying to pass a command to another box using ssh.
>
> I have tried the -n and -o "BatchMode yes" options to ssh but the job
> hangs just before it is due to close.
>
> Running the script from the command line works OK.
>
> Any clues?

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.

Cheers,

-- 
Damien Elmes



More information about the linux mailing list