Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Sep 2015 14:31:33 +0000
From:      James Snow <snow@teardrop.org>
To:        FreeBSD Stable ML <stable@freebsd.org>
Subject:   Re: when the sshd hits the fan
Message-ID:  <20150923143133.GG858@teardrop.org>
In-Reply-To: <20150923123730.GA15788@xtaz.uk>
References:  <56026686.8030308@norma.perm.ru> <8CC54339-0028-4CE4-9AAD-2248CD4E2FC9@lafn.org> <20150923104454.GG36682@home.opsec.eu> <20150923123730.GA15788@xtaz.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 23, 2015 at 01:37:30PM +0100, Matt Smith wrote:

> If this type of thing is being done on the base system sshd it would 
> also be useful to look at the port version of ssh as well? I use the 
> port and it has always annoyed me that I get constant "connection 
> refused" whilst I'm waiting for the server to fully boot up!

Tangential, but in case it's useful to anyone else:

  until ssh -o ConnectTimeout=2 $host; do sleep 1; done

I do this all the time for hosts where I'm waiting on boot. The timeouts
and connection refused messages serve as counters so I can do other
things while waiting and have an objective measure of whether or not
I've waited too long for a host to come up. Also handy is that it will
automatically reconnect on anything other than a deliberate log out.


-Snow




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150923143133.GG858>