tramp-devel
[Top][All Lists]
Advanced

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

SCPC Detection Program


From: Noah Lavine
Subject: SCPC Detection Program
Date: Wed, 31 Mar 2010 22:30:37 -0400

Dear Tramp Developers,

I recently started using Tramp and learned about the different access
methods. As I understand it, the `scpc` method is superior to the
`ssh` method, but can't be set as default because of old versions of
ssh that don't support the ControlMaster argument.

It seems to me that it would be better if Tramp could automatically
detect whether the version of ssh on a computer supported the
ControlMaster argument and use scpc if it were possible. Therefore, I
started working on a program to detect this based on the SSH version
string. The following program correctly detects the presence of an SSH
version greater than 4.0 on my computer:

;; I'm assuming this is called in the definition of
tramp-default-method, after we've found an ssh install
(defun detect-scpc ()
  (with-temp-buffer
    (let ((ssh-call (call-process "ssh" nil t nil "-V")))
      (goto-char (point-min))
      (and (search-forward "OpenSSH_" nil t)
           (looking-at "[0-9.]*")
           (let ((ssl-version (read (match-string 0))))
             (>= ssl-version 4.0))))))

Unfortunately, I'm not very experienced with emacs programming, and in
any case I don't have other computers available to test this on.
Therefore, I'd like to offer this to the tramp developers. I'd be
happy to do whatever is necessary to get this program ready for
inclusion into tramp, but I'm not sure what that is. Please tell me
what changes to make, and I hope this can help make Tramp a bit easier
to use for future users.

Noah Lavine




reply via email to

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