Any workarounds for SSH hang issue?

Damien Miller djm at mindrot.org
Wed Jul 28 09:41:42 EST 2010


On Mon, 26 Jul 2010, Ervin Yan wrote:

> Hi, 
> 
> Recently, I got some problems that my program is very easy to hang when
> call ssh commands in a forked process on unix platforms.
> 
> And I understand that it maybe a tricky issue for ssh according to the
> following FAQs:
> 
> http://www.snailbook.com/faq/background-jobs.auto.html
> 
> http://www.openssh.org/faq.html#3.10
> 
> My question is:  do we have any workarounds so that ssh do not hang
> there.  We do not care the data loss cases.
> 
> I would really appreciate if you could give me some ideas to solve this
> issue.

1) Run a recent sshd - the unwanted hangs at exit are fixed.

2) Redirect stdio to /dev/null or to a file, then you won't hang regardless
   of which sshd you are running under.

-d


More information about the openssh-unix-dev mailing list