Next: , Up: Usage

6.1 Tramp file name conventions

/method:host:/path/to/file opens file /path/to/file on the remote host host, using the method method.

/ssh:melancholia:.emacs
For the file .emacs located in the home directory, on the host melancholia, using method ssh.
/ssh:melancholia.danann.net:.emacs
For the file .emacs specified using the fully qualified domain name of the host.
/ssh:melancholia:~/.emacs
For the file .emacs specified using the ~, which is expanded.
/ssh: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.
/ssh:melancholia:/etc/squid.conf
For the file /etc/squid.conf on the host melancholia.

host can take IPv4 or IPv6 address, as in /ssh:127.0.0.1:.emacs or /ssh:[::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:

     /method:user@host:path/to/file

/ssh:daniel@melancholia:.emacs is for file .emacs in daniel's home directory on the host, melancholia, accessing via method ssh.

For specifying port numbers, affix #<port> to the host name. For example: /ssh:daniel@melancholia#42:.emacs.

All method, user name, host name, port number and local name parts are optional, See Default Method, See Default User, See Default Host. For syntactical reasons, the default method must be indicated by the pseudo method -.