connection attempt timeout - possible feature?
mouring at etoh.eviladmin.org
mouring at etoh.eviladmin.org
Wed Jul 4 14:42:42 EST 2001
This was talked about on efnet #unixhelp about a week ago while talking
about why ssh takes such a long time to timeout. It's a feature of the OS
and the connect() function call in question, IIRC.
So in theory one could wrap the call in sshconnect.c (both places) with a
timer to interrupt connect(). Not sure if there is a cleaner way off
hand.
- Ben
On Wed, 4 Jul 2001 carl at bl.echidna.id.au wrote:
>
> I'm writing a network monitoring script, that has to traverse
> a bunch of firewalls (joy ...) and so for connectivity tests,
> I'm using ssh (OpenSSH 2.x).
>
> I'm being lazy, and trying to avoid parallel tasks/threading,
> so I'm interested in reducing the amount of time OpenSSH will wait
> to connect to something before giving up. I've already set the
> ConnectionAttempts flag to 1, but am interested in reducing the amount of
> time it uses initially. From our boxes, the timeout seems to be abuot 60 seconds,
> but I haven't timed it yet, or groveled through the code enough
> to know for sure.
>
>
> Before I embark on a coding spree and hack at OpenSSH to
> do this, am I looking in the right place? Is this behaviour
> controlled by the application or the OS? My copy of Stevens is
> at home, and I'm not, so my usual reference isn't available right now.
>
> If it is an application specific, would the OpenSSH team be interested in
> a patch if I write one?
>
> Carl
>
>
More information about the openssh-unix-dev
mailing list