TRAMP filename conventions
==========================
To access the file LOCALNAME on the remote machine MACHINE you would
specify the filename `/MACHINE:LOCALNAME'. This will connect to
MACHINE and transfer the file using the default method. Note:Default
Method.
Some examples of TRAMP filenames are shown below.
`/melancholia:.emacs'
Edit the file `.emacs' in your home directory on the machine
`melancholia'.
`/melancholia.danann.net:.emacs'
This edits the same file, using the fully qualified domain name of
the machine.
`/melancholia:~/.emacs'
This also edits the same file -- the `~' is expanded to your home
directory on the remote machine, just like it is locally.
`/melancholia:~daniel/.emacs'
This edits the file `.emacs' in the home directory of the user
`daniel' on the machine `melancholia'. The `~<user>' construct is
expanded to the home directory of that user on the remote machine.
`/melancholia:/etc/squid.conf'
This edits the file `/etc/squid.conf' on the machine `melancholia'.
Unless you specify a different name to use, TRAMP will use the
current local user name as the remote user name to log in with. If you
need to log in as a different user, you can specify the user name as
part of the filename.
To log in to the remote machine as a specific user, you use the
syntax `/USER@MACHINE:/PATH/TO.FILE'. That means that connecting to
`melancholia' as `daniel' and editing `.emacs' in your home directory
you would specify `/daniel@melancholia:.emacs'.
It is also possible to specify other file transfer methods (Note:Default Method) as part of the filename. This is done by putting the
method before the user and host name, as in
`/METHOD:' (Note the trailing colon). The user, machine and file
specification remain the same.
So, to connect to the machine `melancholia' as `daniel', using the
`ssh' method to transfer files, and edit `.emacs' in my home directory
I would specify the filename `/ssh:daniel@melancholia:.emacs'.