tramp-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Multi-hop: ssh, then sudo, then ssh


From: Ole Laursen
Subject: Re: Multi-hop: ssh, then sudo, then ssh
Date: Fri, 3 Dec 2010 13:50:38 +0100

2010/12/2 Michael Albinus <address@hidden>:
> I assume, you use the same user on A and B, let's call him "ole".
>
> (add-to-list 'tramp-default-proxies-alist
>             "B" "ole" "/sudo:address@hidden:")
> (add-to-list 'tramp-default-proxies-alist
>             "A" "root" "/ssh:address@hidden:")

Wohoo, it's working! Thanks!


Just for anyone looking this up later, you forgot the parentheses:

(add-to-list 'tramp-default-proxies-alist
            '("B" nil "/sudo:address@hidden:"))
(add-to-list 'tramp-default-proxies-alist
            '("A" "root" "/ssh:address@hidden:"))

(I dropped the username in the first rule, then it seems I can just do
a "/ssh:B:/somepath" without username)

I think I can follow the logic now - the command is to ssh to B, when
accessing B we must first sudo to root at A, when accessing A as root
we must first ssh to A. It's a bit confusing because it's backwards,
and I think I didn't quite grasp the rule would fire on the sudo too,
the info page is talking about hosts and whatnot. :)


Ole



reply via email to

[Prev in Thread] Current Thread [Next in Thread]