aboutsummaryrefslogtreecommitdiffstats
path: root/doc/misc
diff options
context:
space:
mode:
authorMichael Albinus2024-05-11 10:03:45 +0200
committerMichael Albinus2024-05-11 10:03:45 +0200
commitb43c31d2f50dc71680dfd62412ce9b9afb6c65a4 (patch)
tree2b63e8f060d65e7d222126cf125acb3a6c292671 /doc/misc
parent1c4b1ce8fa7c752454c144d78d8ae14ee88150d3 (diff)
downloademacs-b43c31d2f50dc71680dfd62412ce9b9afb6c65a4.tar.gz
emacs-b43c31d2f50dc71680dfd62412ce9b9afb6c65a4.zip
New Tramp method "run0"
* doc/misc/tramp.texi (Quick Start Guide, Inline methods) (Password handling, Predefined connection information) (Ad-hoc multi-hops): Add "run0". (Remote processes): Mention tramp-use-connection-share. * etc/NEWS: New Tramp method "run0". * lisp/net/tramp.el (tramp-completion-dissect-file-name): * lisp/net/tramp-cmds.el (tramp-list-remote-buffers): * lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory): Use `tramp-compat-keep-seq'. * lisp/net/tramp-cmds.el (tramp-file-name-with-method): Add "run0". * lisp/net/tramp-sh.el (tramp-enable-run0-method): New defun. (tramp-sh-handle-expand-file-name): Add "run0". (tramp-maybe-open-connection): Simplify setting timeout.
Diffstat (limited to 'doc/misc')
-rw-r--r--doc/misc/tramp.texi59
1 files changed, 39 insertions, 20 deletions
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 2b0a982e7f9..6c36429fb79 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -489,14 +489,16 @@ an @command{ssh} server:
489@file{@trampfn{plink,user@@host,/path/to/file}}. 489@file{@trampfn{plink,user@@host,/path/to/file}}.
490 490
491 491
492@anchor{Quick Start Guide su, sudo, doas, androidsu and sg methods} 492@anchor{Quick Start Guide su, sudo, doas, run0, androidsu and sg methods}
493@section Using @option{su}, @option{sudo}, @option{doas}, @option{androidsu} and @option{sg} 493@section Using @option{su}, @option{sudo}, @option{doas}, @option{run0}, @option{androidsu} and @option{sg}
494@cindex method @option{su} 494@cindex method @option{su}
495@cindex @option{su} method 495@cindex @option{su} method
496@cindex method @option{sudo} 496@cindex method @option{sudo}
497@cindex @option{sudo} method 497@cindex @option{sudo} method
498@cindex method @option{doas} 498@cindex method @option{doas}
499@cindex @option{doas} method 499@cindex @option{doas} method
500@cindex method @option{run0}
501@cindex @option{run0} method
500@cindex method @option{androidsu} 502@cindex method @option{androidsu}
501@cindex @option{androidsu} method 503@cindex @option{androidsu} method
502@cindex method @option{sg} 504@cindex method @option{sg}
@@ -504,9 +506,11 @@ an @command{ssh} server:
504 506
505Sometimes, it is necessary to work on your local host under different 507Sometimes, it is necessary to work on your local host under different
506permissions. For this, you can use the @option{su} or @option{sudo} 508permissions. For this, you can use the @option{su} or @option{sudo}
507connection method. On OpenBSD systems, the @option{doas} connection 509connection method. If your system is @code{systemd}-based, there is
508method offers the same functionality. If your local system is 510the @option{run0} connection method. On OpenBSD systems, the
509Android, use the method @option{androidsu} instead of @option{su}. 511@option{doas} connection method offers the same functionality. If
512your local system is Android, use the method @option{androidsu}
513instead of @option{su}.
510 514
511These methods use @samp{root} as default user name and the return 515These methods use @samp{root} as default user name and the return
512value of @code{(system-name)} as default host name. Therefore, it is 516value of @code{(system-name)} as default host name. Therefore, it is
@@ -516,8 +520,8 @@ The method @option{sg} stands for ``switch group''; here the user name
516is used as the group to change to. The default host name is the same. 520is used as the group to change to. The default host name is the same.
517 521
518 522
519@anchor{Quick Start Guide Combining ssh, plink, su, sudo and doas methods} 523@anchor{Quick Start Guide Combining ssh, plink, su, sudo, doas and run0 methods}
520@section Combining @option{ssh} or @option{plink} with @option{su}, @option{sudo} or @option{doas} 524@section Combining @option{ssh} or @option{plink} with @option{su}, @option{sudo}, @option{doas} or @option{run0}
521@cindex method @option{ssh} 525@cindex method @option{ssh}
522@cindex @option{ssh} method 526@cindex @option{ssh} method
523@cindex method @option{plink} 527@cindex method @option{plink}
@@ -528,13 +532,15 @@ is used as the group to change to. The default host name is the same.
528@cindex @option{sudo} method 532@cindex @option{sudo} method
529@cindex method @option{doas} 533@cindex method @option{doas}
530@cindex @option{doas} method 534@cindex @option{doas} method
531 535@cindex method @option{run0}
532If the @option{su}, @option{sudo} or @option{doas} option should be 536@cindex @option{run0} method
533performed on another host, it can be combined with a leading 537
534@option{ssh} or @option{plink} option. That means that @value{tramp} 538If the @option{su}, @option{sudo}, @option{doas} or @option{run0}
535connects first to the other host with non-administrative credentials, 539method should be performed on another host, it can be combined with a
536and changes to administrative credentials on that host afterwards. In 540leading @option{ssh} or @option{plink} method. That means that
537a simple case, the syntax looks like 541@value{tramp} connects first to the other host with non-administrative
542credentials, and changes to administrative credentials on that host
543afterwards. In a simple case, the syntax looks like
538@file{@trampfn{ssh@value{postfixhop}user@@host|sudo,,/path/to/file}}. 544@file{@trampfn{ssh@value{postfixhop}user@@host|sudo,,/path/to/file}}.
539@xref{Ad-hoc multi-hops}. 545@xref{Ad-hoc multi-hops}.
540 546
@@ -882,6 +888,16 @@ This method is used on OpenBSD like the @command{sudo} command. Like
882the @option{sudo} method, a @option{doas} connection is disabled after 888the @option{sudo} method, a @option{doas} connection is disabled after
883a predefined timeout. 889a predefined timeout.
884 890
891@item @option{run0}
892@cindex method @option{run0}
893@cindex @option{run0} method
894
895This method is used on @code{systemd}-based hosts. Internally, it
896uses the @code{systemd-run} command. A @option{run0} connection is
897disabled after a predefined timeout as well.
898
899This is an optional method, @ref{Optional methods}.
900
885@item @option{sg} 901@item @option{sg}
886@cindex method @option{sg} 902@cindex method @option{sg}
887@cindex @option{sg} method 903@cindex @option{sg} method
@@ -2104,8 +2120,9 @@ machine melancholia#4711 port davs login daniel%BIZARRE password geheim
2104 2120
2105For the methods @option{doas}, @option{sudo} and @option{sudoedit} the 2121For the methods @option{doas}, @option{sudo} and @option{sudoedit} the
2106password of the user requesting the connection is needed, and not the 2122password of the user requesting the connection is needed, and not the
2107password of the target user. If these connections happen on the local 2123password of the target user@footnote{On the local host, @code{run0}
2108host, an entry with the local user and local host is used: 2124uses a graphical password agent.}. If these connections happen on the
2125local host, an entry with the local user and local host is used:
2109 2126
2110@example 2127@example
2111machine @var{host} port sudo login @var{user} password secret 2128machine @var{host} port sudo login @var{user} password secret
@@ -2278,8 +2295,8 @@ All @file{tramp-sh.el} based methods accept the property
2278@t{"session-timeout"}. This is the time (in seconds) after a 2295@t{"session-timeout"}. This is the time (in seconds) after a
2279connection is disabled for security reasons, and must be 2296connection is disabled for security reasons, and must be
2280reestablished. A value of @code{nil} disables this feature. Most of 2297reestablished. A value of @code{nil} disables this feature. Most of
2281the methods do not set this property except the @option{sudo} and 2298the methods do not set this property except the @option{sudo},
2282@option{doas} methods, which use predefined values. 2299@option{doas} and @option{run0} methods, which use predefined values.
2283 2300
2284@item @t{"~"}@* 2301@item @t{"~"}@*
2285@t{"~user"} 2302@t{"~user"}
@@ -3815,7 +3832,7 @@ The buffer must either visit a file, or a directory
3815@defopt tramp-file-name-with-method 3832@defopt tramp-file-name-with-method
3816The method @code{tramp-revert-buffer-with-sudo} shows an alternate 3833The method @code{tramp-revert-buffer-with-sudo} shows an alternate
3817buffer. It defaults to @code{sudo}, other valid methods are 3834buffer. It defaults to @code{sudo}, other valid methods are
3818@code{su}, @code{doas}, and @code{ksu}. 3835@code{su}, @code{doas}, @code{run0}, and @code{ksu}.
3819 3836
3820@lisp 3837@lisp
3821(customize-set-variable 'tramp-file-name-with-method "doas") 3838(customize-set-variable 'tramp-file-name-with-method "doas")
@@ -4056,7 +4073,9 @@ here will not work as expected.
4056@vindex ForwardX11Trusted@r{, ssh option} 4073@vindex ForwardX11Trusted@r{, ssh option}
4057An alternate approach is specify @option{ForwardX11 yes} or 4074An alternate approach is specify @option{ForwardX11 yes} or
4058@option{ForwardX11Trusted yes} in @file{~/.ssh/config} on the local 4075@option{ForwardX11Trusted yes} in @file{~/.ssh/config} on the local
4059host. 4076host. Furthermore, set @code{tramp-use-connection-share} to
4077@code{nil} (@pxref{Using ssh connection sharing}), in order to avoid
4078unwanted side effects.
4060 4079
4061 4080
4062@subsection Running @code{shell} on a remote host 4081@subsection Running @code{shell} on a remote host