This is just terrific; thanks! I didn't realize that Tramp had a
manual. This fixes things!
Michael Albinus <[email protected]> writes:
[email protected] (Tory S. Anderson) writes:
Hi Tory,
I have the following in my config files:
(add-to-list 'tramp-default-proxies-alist
'(nil "\\`root\\'" "/ssh:%h:") ;;
https://github.com/emacs-helm/helm/issues/981
))
This causes tramp (which I'm using through Helm) to let me sudo
into any of the many remote servers I work with (assuming they
have ssh keys configured). However, now I can't do find-file
/sudo::<local_path> as it tries to ssh to localhost. Is there
any
way I can keep the over-weighing benefit of sudo remote hosts
while also being able to sudo locally?
The Tramp manual discusses exactly this case:
(add-to-list 'tramp-default-proxies-alist
'(nil "\\`root\\'" "/ssh:%h:"))
(add-to-list 'tramp-default-proxies-alist
'((regexp-quote (system-name)) nil nil))
Be careful to apply both forms in this order, the second rule
must be
the first on in `tramp-default-proxies-alist'. See also
(info "(tramp) Multi-hops")
- Tory
Best regards, Michael.
--
Tory S. Anderson, Lead Application Developer
BYU Office of Digital Humanities
JFSB 1163F
801.422.2739
_______________________________________________
Tramp-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/tramp-devel