aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Albinus2020-09-24 10:17:03 +0200
committerMichael Albinus2020-09-24 10:17:03 +0200
commitde54cd6f0edb3619777c17fe75560c5c84fed8a4 (patch)
tree0cfb3880b2c67ef4b82f7f592715130529070f59
parente542b4b785b1646ba7a801090a6e937645b6b330 (diff)
downloademacs-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.texi78
-rw-r--r--lisp/net/tramp-sh.el4
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
1625With ssh, you could use the @code{ProxyCommand} entry in 1625With @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
1805This function returns the host nicknames defined by @code{Host} entries 1805This function returns the host nicknames defined by @option{Host}
1806in @file{~/.ssh/config} style files. 1806entries 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
2284This variable is, by default, initialised from 2284This 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
2286is usually more convenient to add new passphrases to that variable 2286is usually more convenient to add new passphrases to that user option
2287instead of altering this variable. 2287instead of altering this user option.
2288 2288
2289Similar localization may be necessary for handling wrong password 2289Similar localization may be necessary for handling wrong password
2290prompts, for which @value{tramp} uses @code{tramp-wrong-passwd-regexp}. 2290prompts, for which @value{tramp} uses @code{tramp-wrong-passwd-regexp}.
@@ -2725,7 +2725,7 @@ corresponding password; otherwise there is no way to decrypt your
2725encrypted files. 2725encrypted files.
2726 2726
2727@defopt tramp-crypt-save-encfs-config-remote 2727@defopt tramp-crypt-save-encfs-config-remote
2728If this user option is non-nil (the default), the @option{encfs} 2728If this user option is non-@code{nil} (the default), the @option{encfs}
2729configuration file @file{.encfs6.xml} is also kept in the encrypted 2729configuration file @file{.encfs6.xml} is also kept in the encrypted
2730remote directory. It depends on you, whether you regard the password 2730remote directory. It depends on you, whether you regard the password
2731protection of this file as sufficient. The advantage would be, that 2731protection 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
3186interrupted. Since it cannot be determined reliably whether a remote 3186interrupted. Since it cannot be determined reliably whether a remote
3187process has been interrupted, @code{process-file} returns always the 3187process has been interrupted, @code{process-file} returns always the
3188exit code. When the user option 3188exit 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
3191indication that the process has been interrupted, and returns a 3191indication that the process has been interrupted, and returns a
3192respective string. 3192respective string.
@@ -3317,8 +3317,8 @@ whatever reason, then replace @code{(getenv "DISPLAY")} with a
3317hard-coded, fixed name. Note that using @code{:0} for X11 display name 3317hard-coded, fixed name. Note that using @code{:0} for X11 display name
3318here will not work as expected. 3318here will not work as expected.
3319 3319
3320An alternate approach is specify @code{ForwardX11 yes} or 3320An 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
3322host. 3322host.
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. 3396the variable @code{shell-command-switch} in order to determine which
3397For remote hosts, their default values are @file{/bin/sh} and 3397shell 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
3399uses @file{/system/bin/sh}). Like the variables in the previous 3399@option{adb} method, which uses @file{/system/bin/sh}). Like the
3400section, these variables can be changed via connection-local 3400variables in the previous section, these variables can be changed via
3401variables. 3401connection-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}
3405If Emacs supports the variable @code{async-shell-command-width} (since 3405If 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
3407shell commands. It specifies the number of display columns for 3407asynchronous shell commands. It specifies the number of display
3408command output. For synchronous shell commands, a similar effect can 3408columns for command output. For synchronous shell commands, a similar
3409be achieved by adding the environment variable @env{COLUMNS} to 3409effect 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
3583It does not support interactive user authentication. With 3583It 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
3585agent like @command{ssh-agent}, using public key authentication, or 3585agent like @command{ssh-agent}, using public key authentication, or
3586using @code{ControlMaster} options. 3586using @option{ControlMaster} options.
3587 3587
3588@item 3588@item
3589It cannot be killed via @code{interrupt-process}. 3589It 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
3609bypass @value{tramp}'s handling of the @code{ControlMaster} options, 3609bypass @value{tramp}'s handling of the @option{ControlMaster} options,
3610and use your own settings in @file{~/.ssh/config}. 3610and 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
3681prompted for modification in the minibuffer. The buffers are marked 3681prompted for modification in the minibuffer. The buffers are marked
3682modified, and must be saved explicitly. 3682modified, and must be saved explicitly.
3683 3683
3684If user option @code{tramp-confirm-rename-file-names} is nil, changing 3684If user option @code{tramp-confirm-rename-file-names} is @code{nil},
3685the file name happens without confirmation. This requires a 3685changing the file name happens without confirmation. This requires a
3686matching entry in @code{tramp-default-rename-alist}. 3686matching entry in @code{tramp-default-rename-alist}.
3687 3687
3688Remote buffers related to the remote connection identified by 3688Remote buffers related to the remote connection identified by
@@ -3721,8 +3721,8 @@ Tramp infers by default, such as @samp{@trampfn{method,user@@host,}}).
3721name of @code{source} when calling @code{tramp-rename-files}. 3721name 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
3724result must be a string or nil, which is interpreted as a regular 3724result must be a string or @code{nil}, which is interpreted as a
3725expression which always matches. 3725regular expression which always matches.
3726 3726
3727Example entries: 3727Example 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
4309if a master session opened outside the Emacs session is no longer 4309if a master session opened outside the Emacs session is no longer
4310open. That is why @value{tramp} prompts for the password again even 4310open. That is why @value{tramp} prompts for the password again even
4311if there is an @command{ssh} already open. 4311if there is an @command{ssh} already open.
4312 4312
4313@vindex tramp-ssh-controlmaster-options 4313@vindex tramp-ssh-controlmaster-options
4314Some @command{ssh} versions support a @code{ControlPersist} option, 4314Some @command{ssh} versions support a @option{ControlPersist} option,
4315which allows you to set the @code{ControlPath} provided the variable 4315which 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
4340This 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
4342On multi-hop connections, @value{tramp} does not use @command{ssh} 4346On multi-hop connections, @value{tramp} does not use @command{ssh}
4343@code{ControlMaster} 4347@option{ControlMaster}
4344 4348
4345In order to use the @code{ControlMaster} option, @value{tramp} must 4349In order to use the @option{ControlMaster} option, @value{tramp} must
4346check whether the @command{ssh} client supports this option. This is 4350check whether the @command{ssh} client supports this option. This is
4347only possible on the local host, for the first hop. @value{tramp} 4351only possible on the local host, for the first hop. @value{tramp}
4348does not use this option on proxy hosts. 4352does 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
4368SMB1 connection protocol. 4372SMB1 connection protocol
4369 4373
4370@vindex tramp-smb-options 4374@vindex tramp-smb-options
4371Recent versions of @command{smbclient} do not support old connection 4375Recent 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
4595Use environment variables to expand long strings 4599Use environment variables to expand long strings:
4596 4600
4597For long file names, set up environment variables that are expanded in 4601For long file names, set up environment variables that are expanded in
4598the minibuffer. Environment variables are set either outside Emacs or 4602the 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'.
122Set it to nil, if you use Control* or Proxy* options in your ssh
123configuration."
122 :group 'tramp 124 :group 'tramp
123 :version "24.4" 125 :version "24.4"
124 :type 'boolean) 126 :type 'boolean)