Ole Laursen <[email protected]> writes:

> Hi!

Hi,

> I've read the multiple-hops proxy page a couple of times and searched the
> interwebs, but still can't figure out how I setup this multihop. I need to 
> first
> ssh to server A, then sudo to root (to get access to a private key for B), 
> then 
> ssh to server B, i.e.
>
>   ssh A
>   sudo ssh B
>
> is sufficient to enable me to edit the files. Can Tramp help me here?

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:r...@a:")
(add-to-list 'tramp-default-proxies-alist
             "A" "root" "/ssh:o...@a:")

in this order. Afterwards, you could access "/ssh:o...@b:/path/to/localname".

> Ole

Best regards, Michael.

_______________________________________________
Tramp-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to