[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SCPC Detection Program

From: Noah Lavine
Subject: Re: SCPC Detection Program
Date: Mon, 12 Apr 2010 15:36:42 -0400

Hi Michael,

I checked with my version of ssh, and we would indeed be able to
detect this from its help version string. However, it seems like this
could have similar fragility issues as the version number idea, if the
help string changed format some time. You could solve this by only
trying scpc on help strings that are known to be good, but you could
also have a version number whitelist that would serve the same
purpose. It seems like both of these would work and would be quite
similar - is there a reason to think that one would be better than the

As for the test connection, maybe a change would help. It's probably
not good to try connecting to a known-good host, but what about trying
it with the host that Tramp needs to connect to anyway? You could try
it first with the -ControlMaster option, and if ssh gave an error,
then try again without it and fall back on the other method. This
wouldn't create more ssh connections than necessary. The problem I see
is that it might require a more substantial change to the Tramp
codebase than the other methods, but I don't know, because I haven't
looked around enough to see. Do you think this method would be useful
enough to make it worth looking through the Tramp code more and maybe
making bigger changes?


On Mon, Apr 12, 2010 at 3:18 PM, Michael Albinus <address@hidden> wrote:
> Noah Lavine <address@hidden> writes:
>> Michael,
> Hi Noah,
>> Is there a commonly-used way to discover the capabilities of a system
>> other than version numbers? Talking to the system package manager
>> would also work for most (although not all) cases, and I could look
>> into writing a connection to PackageKit if that seemed like it could
>> work.
>> It would also be really cool if the ssh program had a way to tell us
>> what command-line arguments it accepted, but I don't see any way to do
>> that short of asking it to open up a test connection and seeing if it
>> gave an error message. That might actually be a reasonable way to do
>> this, if you defer the checking until the first use of ssh - first try
>> opening a connection with ControlMaster, and if that fails, try again
>> without it.
> Maybe "ssh --help", and checking for the "-M" option, might be sufficient.
> Trying a "test connection" is not mature, because you don't know which
> test host to connect to. "localhost" does not need to run the sshd daemon.
>> Noah
> Best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]