diff options
| author | Michael Albinus | 2020-09-24 10:17:03 +0200 |
|---|---|---|
| committer | Michael Albinus | 2020-09-24 10:17:03 +0200 |
| commit | de54cd6f0edb3619777c17fe75560c5c84fed8a4 (patch) | |
| tree | 0cfb3880b2c67ef4b82f7f592715130529070f59 | |
| parent | e542b4b785b1646ba7a801090a6e937645b6b330 (diff) | |
| download | emacs-de54cd6f0edb3619777c17fe75560c5c84fed8a4.tar.gz emacs-de54cd6f0edb3619777c17fe75560c5c84fed8a4.zip | |
Minor Tramp cleanup
* doc/misc/tramp.texi: Some stylistic changes.
(Frequently Asked Questions): Mention ProxyCommand and ProxyJump.
* lisp/net/tramp-sh.el (tramp-use-ssh-controlmaster-options):
Fix docstring.
| -rw-r--r-- | doc/misc/tramp.texi | 78 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 4 |
2 files changed, 44 insertions, 38 deletions
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 538f85f35da..806a1ddf684 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi | |||
| @@ -1622,7 +1622,7 @@ support this command. | |||
| 1622 | 1622 | ||
| 1623 | @subsection Tunneling with ssh | 1623 | @subsection Tunneling with ssh |
| 1624 | 1624 | ||
| 1625 | With ssh, you could use the @code{ProxyCommand} entry in | 1625 | With @command{ssh}, you could use the @option{ProxyCommand} entry in |
| 1626 | @file{~/.ssh/config}: | 1626 | @file{~/.ssh/config}: |
| 1627 | 1627 | ||
| 1628 | @example | 1628 | @example |
| @@ -1802,8 +1802,8 @@ in such files, it can return host names only. | |||
| 1802 | @item @code{tramp-parse-sconfig} | 1802 | @item @code{tramp-parse-sconfig} |
| 1803 | @findex tramp-parse-sconfig | 1803 | @findex tramp-parse-sconfig |
| 1804 | 1804 | ||
| 1805 | This function returns the host nicknames defined by @code{Host} entries | 1805 | This function returns the host nicknames defined by @option{Host} |
| 1806 | in @file{~/.ssh/config} style files. | 1806 | entries in @file{~/.ssh/config} style files. |
| 1807 | 1807 | ||
| 1808 | @item @code{tramp-parse-shostkeys} | 1808 | @item @code{tramp-parse-shostkeys} |
| 1809 | @findex tramp-parse-shostkeys | 1809 | @findex tramp-parse-shostkeys |
| @@ -2281,10 +2281,10 @@ example below: | |||
| 2281 | @end lisp | 2281 | @end lisp |
| 2282 | 2282 | ||
| 2283 | @vindex password-word-equivalents | 2283 | @vindex password-word-equivalents |
| 2284 | This variable is, by default, initialised from | 2284 | This user option is, by default, initialised from |
| 2285 | @code{password-word-equivalents} when @value{tramp} is loaded, and it | 2285 | @code{password-word-equivalents} when @value{tramp} is loaded, and it |
| 2286 | is usually more convenient to add new passphrases to that variable | 2286 | is usually more convenient to add new passphrases to that user option |
| 2287 | instead of altering this variable. | 2287 | instead of altering this user option. |
| 2288 | 2288 | ||
| 2289 | Similar localization may be necessary for handling wrong password | 2289 | Similar localization may be necessary for handling wrong password |
| 2290 | prompts, for which @value{tramp} uses @code{tramp-wrong-passwd-regexp}. | 2290 | prompts, for which @value{tramp} uses @code{tramp-wrong-passwd-regexp}. |
| @@ -2725,7 +2725,7 @@ corresponding password; otherwise there is no way to decrypt your | |||
| 2725 | encrypted files. | 2725 | encrypted files. |
| 2726 | 2726 | ||
| 2727 | @defopt tramp-crypt-save-encfs-config-remote | 2727 | @defopt tramp-crypt-save-encfs-config-remote |
| 2728 | If this user option is non-nil (the default), the @option{encfs} | 2728 | If this user option is non-@code{nil} (the default), the @option{encfs} |
| 2729 | configuration file @file{.encfs6.xml} is also kept in the encrypted | 2729 | configuration file @file{.encfs6.xml} is also kept in the encrypted |
| 2730 | remote directory. It depends on you, whether you regard the password | 2730 | remote directory. It depends on you, whether you regard the password |
| 2731 | protection of this file as sufficient. The advantage would be, that | 2731 | protection of this file as sufficient. The advantage would be, that |
| @@ -3186,7 +3186,7 @@ or a string describing the signal, when the process has been | |||
| 3186 | interrupted. Since it cannot be determined reliably whether a remote | 3186 | interrupted. Since it cannot be determined reliably whether a remote |
| 3187 | process has been interrupted, @code{process-file} returns always the | 3187 | process has been interrupted, @code{process-file} returns always the |
| 3188 | exit code. When the user option | 3188 | exit code. When the user option |
| 3189 | @code{process-file-return-signal-string} is non-nil, | 3189 | @code{process-file-return-signal-string} is non-@code{nil}, |
| 3190 | @code{process-file} regards all exit codes greater than 128 as an | 3190 | @code{process-file} regards all exit codes greater than 128 as an |
| 3191 | indication that the process has been interrupted, and returns a | 3191 | indication that the process has been interrupted, and returns a |
| 3192 | respective string. | 3192 | respective string. |
| @@ -3317,8 +3317,8 @@ whatever reason, then replace @code{(getenv "DISPLAY")} with a | |||
| 3317 | hard-coded, fixed name. Note that using @code{:0} for X11 display name | 3317 | hard-coded, fixed name. Note that using @code{:0} for X11 display name |
| 3318 | here will not work as expected. | 3318 | here will not work as expected. |
| 3319 | 3319 | ||
| 3320 | An alternate approach is specify @code{ForwardX11 yes} or | 3320 | An alternate approach is specify @option{ForwardX11 yes} or |
| 3321 | @code{ForwardX11Trusted yes} in @file{~/.ssh/config} on the local | 3321 | @option{ForwardX11Trusted yes} in @file{~/.ssh/config} on the local |
| 3322 | host. | 3322 | host. |
| 3323 | 3323 | ||
| 3324 | 3324 | ||
| @@ -3392,22 +3392,22 @@ continuous output. | |||
| 3392 | 3392 | ||
| 3393 | @vindex shell-file-name | 3393 | @vindex shell-file-name |
| 3394 | @vindex shell-command-switch | 3394 | @vindex shell-command-switch |
| 3395 | @code{shell-command} uses the variables @code{shell-file-name} and | 3395 | @code{shell-command} uses the user option @code{shell-file-name} and |
| 3396 | @code{shell-command-switch} in order to determine which shell to run. | 3396 | the variable @code{shell-command-switch} in order to determine which |
| 3397 | For remote hosts, their default values are @file{/bin/sh} and | 3397 | shell to run. For remote hosts, their default values are |
| 3398 | @option{-c}, respectively (except for the @option{adb} method, which | 3398 | @file{/bin/sh} and @option{-c}, respectively (except for the |
| 3399 | uses @file{/system/bin/sh}). Like the variables in the previous | 3399 | @option{adb} method, which uses @file{/system/bin/sh}). Like the |
| 3400 | section, these variables can be changed via connection-local | 3400 | variables in the previous section, these variables can be changed via |
| 3401 | variables. | 3401 | connection-local variables. |
| 3402 | 3402 | ||
| 3403 | @vindex async-shell-command-width | 3403 | @vindex async-shell-command-width |
| 3404 | @vindex COLUMNS@r{, environment variable} | 3404 | @vindex COLUMNS@r{, environment variable} |
| 3405 | If Emacs supports the variable @code{async-shell-command-width} (since | 3405 | If Emacs supports the user option @code{async-shell-command-width} |
| 3406 | @w{Emacs 27}), @value{tramp} cares about its value for asynchronous | 3406 | (since @w{Emacs 27}), @value{tramp} cares about its value for |
| 3407 | shell commands. It specifies the number of display columns for | 3407 | asynchronous shell commands. It specifies the number of display |
| 3408 | command output. For synchronous shell commands, a similar effect can | 3408 | columns for command output. For synchronous shell commands, a similar |
| 3409 | be achieved by adding the environment variable @env{COLUMNS} to | 3409 | effect can be achieved by adding the environment variable |
| 3410 | @code{tramp-remote-process-environment}. | 3410 | @env{COLUMNS} to @code{tramp-remote-process-environment}. |
| 3411 | 3411 | ||
| 3412 | 3412 | ||
| 3413 | @subsection Running @code{eshell} on a remote host | 3413 | @subsection Running @code{eshell} on a remote host |
| @@ -3583,7 +3583,7 @@ It works only for connection methods defined in @file{tramp-sh.el} and | |||
| 3583 | It does not support interactive user authentication. With | 3583 | It does not support interactive user authentication. With |
| 3584 | @option{ssh}-based methods, this can be avoided by using a password | 3584 | @option{ssh}-based methods, this can be avoided by using a password |
| 3585 | agent like @command{ssh-agent}, using public key authentication, or | 3585 | agent like @command{ssh-agent}, using public key authentication, or |
| 3586 | using @code{ControlMaster} options. | 3586 | using @option{ControlMaster} options. |
| 3587 | 3587 | ||
| 3588 | @item | 3588 | @item |
| 3589 | It cannot be killed via @code{interrupt-process}. | 3589 | It cannot be killed via @code{interrupt-process}. |
| @@ -3606,7 +3606,7 @@ In order to gain even more performance, it is recommended to bind | |||
| 3606 | @code{tramp-verbose} to 0 when running @code{make-process} or | 3606 | @code{tramp-verbose} to 0 when running @code{make-process} or |
| 3607 | @code{start-file-process}. Furthermore, you might set | 3607 | @code{start-file-process}. Furthermore, you might set |
| 3608 | @code{tramp-use-ssh-controlmaster-options} to @code{nil} in order to | 3608 | @code{tramp-use-ssh-controlmaster-options} to @code{nil} in order to |
| 3609 | bypass @value{tramp}'s handling of the @code{ControlMaster} options, | 3609 | bypass @value{tramp}'s handling of the @option{ControlMaster} options, |
| 3610 | and use your own settings in @file{~/.ssh/config}. | 3610 | and use your own settings in @file{~/.ssh/config}. |
| 3611 | 3611 | ||
| 3612 | 3612 | ||
| @@ -3681,8 +3681,8 @@ On all buffers, which have a @code{buffer-file-name} matching | |||
| 3681 | prompted for modification in the minibuffer. The buffers are marked | 3681 | prompted for modification in the minibuffer. The buffers are marked |
| 3682 | modified, and must be saved explicitly. | 3682 | modified, and must be saved explicitly. |
| 3683 | 3683 | ||
| 3684 | If user option @code{tramp-confirm-rename-file-names} is nil, changing | 3684 | If user option @code{tramp-confirm-rename-file-names} is @code{nil}, |
| 3685 | the file name happens without confirmation. This requires a | 3685 | changing the file name happens without confirmation. This requires a |
| 3686 | matching entry in @code{tramp-default-rename-alist}. | 3686 | matching entry in @code{tramp-default-rename-alist}. |
| 3687 | 3687 | ||
| 3688 | Remote buffers related to the remote connection identified by | 3688 | Remote buffers related to the remote connection identified by |
| @@ -3721,8 +3721,8 @@ Tramp infers by default, such as @samp{@trampfn{method,user@@host,}}). | |||
| 3721 | name of @code{source} when calling @code{tramp-rename-files}. | 3721 | name of @code{source} when calling @code{tramp-rename-files}. |
| 3722 | 3722 | ||
| 3723 | @code{source} could also be a Lisp form, which will be evaluated. The | 3723 | @code{source} could also be a Lisp form, which will be evaluated. The |
| 3724 | result must be a string or nil, which is interpreted as a regular | 3724 | result must be a string or @code{nil}, which is interpreted as a |
| 3725 | expression which always matches. | 3725 | regular expression which always matches. |
| 3726 | 3726 | ||
| 3727 | Example entries: | 3727 | Example entries: |
| 3728 | 3728 | ||
| @@ -4302,17 +4302,17 @@ Host * | |||
| 4302 | 4302 | ||
| 4303 | 4303 | ||
| 4304 | @item | 4304 | @item |
| 4305 | @value{tramp} does not use default @command{ssh} @code{ControlPath} | 4305 | @value{tramp} does not use default @command{ssh} @option{ControlPath} |
| 4306 | 4306 | ||
| 4307 | @value{tramp} overwrites @code{ControlPath} settings when initiating | 4307 | @value{tramp} overwrites @option{ControlPath} settings when initiating |
| 4308 | @command{ssh} sessions. @value{tramp} does this to fend off a stall | 4308 | @command{ssh} sessions. @value{tramp} does this to fend off a stall |
| 4309 | if a master session opened outside the Emacs session is no longer | 4309 | if a master session opened outside the Emacs session is no longer |
| 4310 | open. That is why @value{tramp} prompts for the password again even | 4310 | open. That is why @value{tramp} prompts for the password again even |
| 4311 | if there is an @command{ssh} already open. | 4311 | if there is an @command{ssh} already open. |
| 4312 | 4312 | ||
| 4313 | @vindex tramp-ssh-controlmaster-options | 4313 | @vindex tramp-ssh-controlmaster-options |
| 4314 | Some @command{ssh} versions support a @code{ControlPersist} option, | 4314 | Some @command{ssh} versions support a @option{ControlPersist} option, |
| 4315 | which allows you to set the @code{ControlPath} provided the variable | 4315 | which allows you to set the @option{ControlPath} provided the variable |
| 4316 | @code{tramp-ssh-controlmaster-options} is customized as follows: | 4316 | @code{tramp-ssh-controlmaster-options} is customized as follows: |
| 4317 | 4317 | ||
| 4318 | @lisp | 4318 | @lisp |
| @@ -4337,12 +4337,16 @@ this @code{nil} setting: | |||
| 4337 | (customize-set-variable 'tramp-use-ssh-controlmaster-options nil) | 4337 | (customize-set-variable 'tramp-use-ssh-controlmaster-options nil) |
| 4338 | @end lisp | 4338 | @end lisp |
| 4339 | 4339 | ||
| 4340 | This shall also be set to @code{nil} if you use the | ||
| 4341 | @option{ProxyCommand} or @option{ProxyJump} options in your | ||
| 4342 | @command{ssh} configuration. | ||
| 4343 | |||
| 4340 | 4344 | ||
| 4341 | @item | 4345 | @item |
| 4342 | On multi-hop connections, @value{tramp} does not use @command{ssh} | 4346 | On multi-hop connections, @value{tramp} does not use @command{ssh} |
| 4343 | @code{ControlMaster} | 4347 | @option{ControlMaster} |
| 4344 | 4348 | ||
| 4345 | In order to use the @code{ControlMaster} option, @value{tramp} must | 4349 | In order to use the @option{ControlMaster} option, @value{tramp} must |
| 4346 | check whether the @command{ssh} client supports this option. This is | 4350 | check whether the @command{ssh} client supports this option. This is |
| 4347 | only possible on the local host, for the first hop. @value{tramp} | 4351 | only possible on the local host, for the first hop. @value{tramp} |
| 4348 | does not use this option on proxy hosts. | 4352 | does not use this option on proxy hosts. |
| @@ -4365,7 +4369,7 @@ supported on your proxy host. | |||
| 4365 | 4369 | ||
| 4366 | @item | 4370 | @item |
| 4367 | @value{tramp} does not connect to Samba or MS Windows hosts running | 4371 | @value{tramp} does not connect to Samba or MS Windows hosts running |
| 4368 | SMB1 connection protocol. | 4372 | SMB1 connection protocol |
| 4369 | 4373 | ||
| 4370 | @vindex tramp-smb-options | 4374 | @vindex tramp-smb-options |
| 4371 | Recent versions of @command{smbclient} do not support old connection | 4375 | Recent versions of @command{smbclient} do not support old connection |
| @@ -4592,7 +4596,7 @@ completion can further reduce key strokes: @kbd{C-x C-f | |||
| 4592 | @value{prefix}ssh@value{postfixhop}x @key{TAB}}. | 4596 | @value{prefix}ssh@value{postfixhop}x @key{TAB}}. |
| 4593 | 4597 | ||
| 4594 | @item | 4598 | @item |
| 4595 | Use environment variables to expand long strings | 4599 | Use environment variables to expand long strings: |
| 4596 | 4600 | ||
| 4597 | For long file names, set up environment variables that are expanded in | 4601 | For long file names, set up environment variables that are expanded in |
| 4598 | the minibuffer. Environment variables are set either outside Emacs or | 4602 | the minibuffer. Environment variables are set either outside Emacs or |
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 7a3f3fe8f02..a51edae1482 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -118,7 +118,9 @@ detected as prompt when being sent on echoing hosts, therefore.") | |||
| 118 | 118 | ||
| 119 | ;;;###tramp-autoload | 119 | ;;;###tramp-autoload |
| 120 | (defcustom tramp-use-ssh-controlmaster-options t | 120 | (defcustom tramp-use-ssh-controlmaster-options t |
| 121 | "Whether to use `tramp-ssh-controlmaster-options'." | 121 | "Whether to use `tramp-ssh-controlmaster-options'. |
| 122 | Set it to nil, if you use Control* or Proxy* options in your ssh | ||
| 123 | configuration." | ||
| 122 | :group 'tramp | 124 | :group 'tramp |
| 123 | :version "24.4" | 125 | :version "24.4" |
| 124 | :type 'boolean) | 126 | :type 'boolean) |