Chris Withers <[email protected]> writes:
> (add-to-list 'tramp-default-proxies-alist
> '(nil "\\`root\\'" "/ssh:%h:"))
> (add-to-list 'tramp-default-proxies-alist
> '((regexp-quote (system-name)) nil nil))
>
> I can now successful open things like /sudo::/etc/ to sudo open local
> files, and I can open remote files under my username with, eg,
> /myu...@thehost:~/, but if I try and open /sudo:thehost: I still get:
>
> ad-Orig-error: Cannot connect to different host `thehost' with `su'
> connection method
This works for me. Could you, please, tell which emacs-version and
tramp-version you are using? I'm a little bit surprised by the "Cannot
connect to different host" error message, this sounds like Tramp
2.0. You need Tramp 2.1 for the recipe I gave you.
> /myu...@thehost:~/
> /sudo:thehost:/
This shall work with the settings above.
> /sudo:different_user_to_my_local_u...@thehost:/
For this, you need another rule, like
(add-to-list 'tramp-default-proxies-alist
'(nil "\\`different_user_to_my_local_user\\'" "/ssh:%h:"))
> Chris
Best regards, Michael.
_______________________________________________
Tramp-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/tramp-devel