tramp: File name Syntax

 
 5.1 TRAMP file name conventions
 ===============================
 
 ‘/host:localfilename’ opens file LOCALFILENAME on the remote host HOST,
 using the default method.  SeeDefault Method.
 
 ‘/melancholia:.emacs’
      For the file ‘.emacs’ located in the home directory, on the host
      ‘melancholia’.
 
 ‘/melancholia.danann.net:.emacs’
      For the file ‘.emacs’ specified using the fully qualified domain
      name of the host.
 
 ‘/melancholia:~/.emacs’
      For the file ‘.emacs’ specified using the ‘~’, which is expanded.
 
 ‘/melancholia:~daniel/.emacs’
      For the file ‘.emacs’ located in ‘daniel’’s home directory on the
      host, ‘melancholia’.  The ‘~<user>’ construct is expanded to the
      home directory of that user on the remote host.
 
 ‘/melancholia:/etc/squid.conf’
      For the file ‘/etc/squid.conf’ on the host ‘melancholia’.
 
    HOST can take IPv4 or IPv6 address, as in ‘/127.0.0.1:.emacs’ or
 ‘/[::1]:.emacs’.  For syntactical reasons, IPv6 addresses must be
 embedded in square brackets ‘[’ and ‘]’.
 
    By default, TRAMP will use the current local user name as the remote
 user name for log in to the remote host.  Specifying a different name
 using the proper syntax will override this default behavior:
 
      /user@host:path/to.file
 
    ‘/daniel@melancholia:.emacs’ is for file ‘.emacs’ in ‘daniel’’s home
 directory on the host, ‘melancholia’.
 
DONTPRINTYET     Specify other file access methods (SeeInline methods, *noteDONTPRINTYET     Specify other file access methods (SeeInline methods, See
 External methods) as part of the file name.
 
    Method name comes before user name, as in ‘/METHOD:’ (Note the
 trailing colon).  The syntax specifications for user, host, and file do
 not change.
 
    To connect to the host ‘melancholia’ as ‘daniel’, using ‘ssh’ method
 for ‘.emacs’ in ‘daniel’’s home directory, the full specification is:
 ‘/ssh:daniel@melancholia:.emacs’.
 
    A remote file name containing a host name, which is the same string
 as a method name, is not allowed.
 
    For specifying port numbers, affix ‘#<port>’ to the host name.  For
 example: ‘/ssh:daniel@melancholia#42:.emacs’.