Commit 572b79d8 authored by Michael Albinus's avatar Michael Albinus
Browse files

* net/tramp.el (tramp-methods): Introduce new method `scpc'.

Remove "ControlMaster" option from the other `scp*' methods.
(tramp-default-method): Check for ssh-agent before setting to
`scp'.
parent 8eeae1c9
2006-12-19 Michael Albinus <michael.albinus@gmx.de>
* net/tramp.el (tramp-methods): Introduce new method `scpc'.
Remove "ControlMaster" option from the other `scp*' methods.
(tramp-default-method): Check for ssh-agent before setting to
`scp'.
2006-12-18 Carsten Dominik <dominik@science.uva.nl> 2006-12-18 Carsten Dominik <dominik@science.uva.nl>
   
* textmodes/org.el (org-mode): Show context after isearch. * textmodes/org.el (org-mode): Show context after isearch.
...@@ -326,35 +326,24 @@ This variable defaults to the value of `tramp-encoding-shell'." ...@@ -326,35 +326,24 @@ This variable defaults to the value of `tramp-encoding-shell'."
(tramp-login-program "ssh") (tramp-login-program "ssh")
(tramp-copy-program "scp") (tramp-copy-program "scp")
(tramp-remote-sh "/bin/sh") (tramp-remote-sh "/bin/sh")
(tramp-login-args ("-o" "ControlPath=%t.%%r@%%h:%%p" (tramp-login-args ("-e" "none"))
"-o" "ControlMaster=yes" (tramp-copy-args nil)
"-e" "none"))
(tramp-copy-args ("-o" "ControlPath=%t.%%r@%%h:%%p"
"-o" "ControlMaster=auto"))
(tramp-copy-keep-date-arg "-p") (tramp-copy-keep-date-arg "-p")
(tramp-password-end-of-line nil)) (tramp-password-end-of-line nil))
("scp1" (tramp-connection-function tramp-open-connection-rsh) ("scp1" (tramp-connection-function tramp-open-connection-rsh)
(tramp-login-program "ssh") (tramp-login-program "ssh")
(tramp-copy-program "scp") (tramp-copy-program "scp")
(tramp-remote-sh "/bin/sh") (tramp-remote-sh "/bin/sh")
(tramp-login-args ("-o" "ControlPath=%t.%%r@%%h:%%p" (tramp-login-args ("-1" "-e" "none"))
"-o" "ControlMaster=yes" (tramp-copy-args ("-1"))
"-1" "-e" "none"))
(tramp-copy-args ("-o" "ControlPath=%t.%%r@%%h:%%p"
"-o" "ControlMaster=auto"
"-1"))
(tramp-copy-keep-date-arg "-p") (tramp-copy-keep-date-arg "-p")
(tramp-password-end-of-line nil)) (tramp-password-end-of-line nil))
("scp2" (tramp-connection-function tramp-open-connection-rsh) ("scp2" (tramp-connection-function tramp-open-connection-rsh)
(tramp-login-program "ssh") (tramp-login-program "ssh")
(tramp-copy-program "scp") (tramp-copy-program "scp")
(tramp-remote-sh "/bin/sh") (tramp-remote-sh "/bin/sh")
(tramp-login-args ("-o" "ControlPath=%t.%%r@%%h:%%p" (tramp-login-args ("-2" "-e" "none"))
"-o" "ControlMaster=yes" (tramp-copy-args ("-2"))
"-2" "-e" "none"))
(tramp-copy-args ("-o" "ControlPath=%t.%%r@%%h:%%p"
"-o" "ControlMaster=auto"
"-2"))
(tramp-copy-keep-date-arg "-p") (tramp-copy-keep-date-arg "-p")
(tramp-password-end-of-line nil)) (tramp-password-end-of-line nil))
("scp1_old" ("scp1_old"
...@@ -483,6 +472,17 @@ This variable defaults to the value of `tramp-encoding-shell'." ...@@ -483,6 +472,17 @@ This variable defaults to the value of `tramp-encoding-shell'."
(tramp-copy-args nil) (tramp-copy-args nil)
(tramp-copy-keep-date-arg nil) (tramp-copy-keep-date-arg nil)
(tramp-password-end-of-line nil)) (tramp-password-end-of-line nil))
("scpc" (tramp-connection-function tramp-open-connection-rsh)
(tramp-login-program "ssh")
(tramp-copy-program "scp")
(tramp-remote-sh "/bin/sh")
(tramp-login-args ("-o" "ControlPath=%t.%%r@%%h:%%p"
"-o" "ControlMaster=yes"
"-e" "none"))
(tramp-copy-args ("-o" "ControlPath=%t.%%r@%%h:%%p"
"-o" "ControlMaster=auto"))
(tramp-copy-keep-date-arg "-p")
(tramp-password-end-of-line nil))
("scpx" (tramp-connection-function tramp-open-connection-rsh) ("scpx" (tramp-connection-function tramp-open-connection-rsh)
(tramp-login-program "ssh") (tramp-login-program "ssh")
(tramp-copy-program "scp") (tramp-copy-program "scp")
...@@ -684,33 +684,32 @@ various functions for details." ...@@ -684,33 +684,32 @@ various functions for details."
:type '(repeat (list string function string))) :type '(repeat (list string function string)))
(defcustom tramp-default-method (defcustom tramp-default-method
(or (cond
;; An external copy method seems to be preferred, because it is ;; An external copy method seems to be preferred, because it is
;; much more performant for large files, and it hasn't too serious ;; much more performant for large files, and it hasn't too serious
;; delays for small files. But it must be ensured that there ;; delays for small files. But it must be ensured that there
;; aren't permanent password queries. Either the copy method shall ;; aren't permanent password queries. Either a password agent like
;; reuse other channels (ControlMaster of OpenSSH does it), a ;; "ssh-agent" or "Pageant" shall run, or the optional password.el
;; password agent like "ssh-agent" or "Pageant" shall run, or the ;; package shall be active for password caching.
;; optional password.el package shall be active for password caching. ((executable-find "pscp")
(and (fboundp 'executable-find) ;; PuTTY is installed.
;; Check whether PuTTY is installed. (if (or (fboundp 'password-read)
(executable-find "pscp") ;; Pageant is running.
(if (or (and (fboundp 'w32-window-exists-p)
;; password.el is loaded. (funcall (symbol-function 'w32-window-exists-p)
(fboundp 'password-read) "Pageant" "Pageant")))
;; Pageant is running. "pscp"
(and (fboundp 'w32-window-exists-p) "plink"))
(funcall (symbol-function 'w32-window-exists-p) ;; There is an ssh installation.
"Pageant" "Pageant"))) ((executable-find "scp")
;; We know that the password will not be retrieved again. (if (or (fboundp 'password-read)
"pscp" ;; ssh-agent is running.
;; When "pscp" exists, there is also "plink". (getenv "SSH_AUTH_SOCK")
"plink")) (getnev "SSH_AGENT_PID"))
;; Under UNIX, ControlMaster is activated. This does not work "scp"
;; under Cygwin, but ssh-agent must be enabled then anyway due to "ssh"))
;; the pseudo-tty problem of Cygwin's OpenSSH implementation. So ;; Fallback.
;; it doesn't hurt to use "scp". (t "ftp"))
"scp")
"*Default method to use for transferring files. "*Default method to use for transferring files.
See `tramp-methods' for possibilities. See `tramp-methods' for possibilities.
Also see `tramp-default-method-alist'." Also see `tramp-default-method-alist'."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment