cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Autodetecting sshd options (was Re: Unavailable sshd when not in PATH)

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Mon, 2 Apr 2007 12:42:42 -0700

On Mon, Apr 02, 2007 at 09:24:53PM +0200, Yang Tse wrote:
> And using the following to avoid both problems ?
>
> my $err = grep /Unsupported .* $option/, qx($sshd -t -f /dev/null -o
> $option=no 2>&1);
>
> Or even better, using a testsuite generated empty config file ?
>
> Both work here.

This still suffers from sshd using its compiled-in defaults for things
like host key file location, etc., so it complains if those aren't
available, but the grep ignores those, anyway. This way at least
guarantees that the configuration file used by sshd is completely under
curl's control, so it's definitely better. The other option would be to
write out an curl_sshd_config for each iteration, but that probably won't
actually improve anything given current versions of sshd.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2007-04-02