Configure TRAMP for sudo/doas over SSH
This commit is contained in:
parent
3d5cc4e215
commit
f2534ffcfc
14
config.org
14
config.org
@ -1082,3 +1082,17 @@
|
|||||||
smtpmail-stream-type 'starttls
|
smtpmail-stream-type 'starttls
|
||||||
send-mail-function 'smtpmail-send-it)
|
send-mail-function 'smtpmail-send-it)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
* Remote Access
|
||||||
|
** Sudo/doas on Remote Hosts
|
||||||
|
To edit files as root on remote hosts with sudo or doas while also
|
||||||
|
tunneling over SSH, you need to configure TRAMP to use SSH as a
|
||||||
|
proxy. This is done by adding to [[help:tramp-default-proxies-alist][tramp-default-proxies-alist]], as
|
||||||
|
detailed in [[info:tramp#Multi-hops][the TRAMP manual]]:
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(add-to-list 'tramp-default-proxies-alist
|
||||||
|
'(nil "\\`root\\'" "/ssh:%h:"))
|
||||||
|
(add-to-list 'tramp-default-proxies-alist
|
||||||
|
'((regexp-quote (system-name)) nil nil))
|
||||||
|
#+end_src
|
||||||
|
Loading…
x
Reference in New Issue
Block a user