1 An overview of TRAMP

TRAMP is for transparently accessing remote files from within Emacs. TRAMP enables an easy, convenient, and consistent interface to remote files as if they are local files. TRAMP’s transparency extends to editing, version control, and dired.

TRAMP can access remote hosts using any number of access methods, such as ssh, scp, telnet, and related programs. If these programs can successfully pass ASCII characters, TRAMP can use them. TRAMP does not require or mandate 8-bit clean connections.

TRAMP’s most common access method is through ssh, a more secure alternative to ftp and other older access methods.

TRAMP on MS Windows operating systems is integrated with the PuTTY package, and uses the plink program.

TRAMP mostly operates transparently in the background using the connection programs. As long as these programs enable remote login and can use the terminal, TRAMP can adapt them for seamless and transparent access.

TRAMP temporarily transfers a remote file’s contents to the local host editing and related operations. TRAMP can also transfer files between hosts using standard Emacs interfaces, a benefit of direct integration of TRAMP in Emacs.

TRAMP can transfer files using any number of available host programs for remote files, such as rcp, scp, rsync or (under MS Windows) pscp. TRAMP provides easy ways to specify these programs and customize them to specific files, hosts, or access methods.

For faster small-size file transfers, TRAMP supports encoded transfers directly through the shell using mimencode or uuencode provided such tools are available on the remote host.

TRAMP behind the scenes

Accessing a remote file through TRAMP entails a series of actions, many of which are transparent to the user. Yet some actions may require user response (such as entering passwords or completing file names). One typical scenario, opening a file on a remote host, is presented here to illustrate the steps involved:

C-x C-f to initiate find-file, enter part of the TRAMP file name, then hit TAB for completion. If this is the first time connecting to that host, here’s what happens:

I hope this has provided you with a basic overview of what happens behind the scenes when you open a file with TRAMP.