Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>As of Emacs 24.3, an analog of the old <code>multi:</code> syntax has been layered on top of the modern <code>tramp-default-proxies-alist</code> approach, meaning that you can once again perform multi-hops without any prior configuration. For details, see:</p> <p><kbd>C-h</kbd><kbd>i</kbd><kbd>g</kbd> <code>(tramp) Ad-hoc multi-hops</code> <kbd>RET</kbd></p> <p>With the new syntax, each 'hop' is separated by <code>|</code>. The example in the manual is:</p> <p><kbd>C-x</kbd><kbd>C-f</kbd> <code>/ssh:bird@bastion|ssh:you@remotehost:/path</code> <kbd>RET</kbd></p> <p>Which connects firstly as <code>bird@bastion</code>, and from there to <code>you@remotehost:/path</code></p> <h2>/su: or /sudo: on remote hosts</h2> <p>You can also use this syntax to sudo/su to root (or of course any other user) on a remote host:</p> <p><kbd>C-x</kbd><kbd>C-f</kbd> <code>/ssh:you@remotehost|sudo:remotehost:/path/to/file</code> <kbd>RET</kbd></p> <p><strong>Important</strong>: be sure to specify the hostname explicitly: <code>sudo:remotehost:</code> rather than <code>sudo::</code> (see below).</p> <p>As this still uses the proxy mechanism underneath, <code>tramp-default-proxies-alist</code> should now include the value <code>("remotehost" "root" "/ssh:you@remotehost:")</code></p> <p>Meaning that the proxy <code>/ssh:you@remotehost:</code> is going to be used whenever you request a file as <code>root@remotehost</code>.</p> <p><code>root</code> is the default user for these methods, but you can of course also change to a non-root user with:</p> <p><kbd>C-x</kbd><kbd>C-f</kbd> <code>/ssh:you@remotehost|sudo:them@remotehost:/path/to/file</code> <kbd>RET</kbd></p> <h2>Always specify the remote hostname explicitly</h2> <p>You are probably used to using <code>sudo::</code> or <code>su::</code> and omitting the hostname. If you are <em>staying</em> on the localhost then this is still fine, but if you are hopping to a remote server then you <em>must</em> specify the hostname for every hop -- even if it is the same as for the previous hop. Always use <code>sudo:hostname:</code> or <code>su:hostname:</code> with remote hosts.</p> <p>The trap here is that <code>sudo::</code> <em>does</em> actually appear to work -- <em>however</em> when you do that the HOST for the dynamic proxy entry will be the hostname you <em>originated</em> from rather than the host you connected to. This will not only look confusing (as the wrong host will be displayed in the file paths), but it will also mean that any subsequent attempt to use <code>sudo::</code> on your localhost will instead be proxied to the remote server! (and the proxy would also presumably be clobbered if you did the same thing on a second server, causing further issues).</p> <p>In short, don't use <code>::</code> when you multi-hop!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload