Next: , Previous: Password handling, Up: Configuration

4.13 Reusing connection related information

For faster initial connection times, tramp stores previous connection properties in a file specified by the variable tramp-persistency-file-name.

The default file name for tramp-persistency-file-name is: ~/.emacs.d/tramp.

tramp reads this file during Emacs startup, and writes to it when exiting Emacs. Delete this file for tramp to recreate a new one on next Emacs startup.

Set tramp-persistency-file-name to nil to disable storing connections persistently.

To reuse connection information from the persistent list, tramp needs to uniquely identify every host. However in some cases, two different connections may result in the same persistent information. For example, connecting to a host using ssh and connecting to the same host through sshd on port 3001. Both access methods result in nearly identical persistent specifications /ssh:localhost: and /ssh:localhost#3001:.

Changing host names could avoid duplicates. One way is to add a Host section in ~/.ssh/config (see Frequently Asked Questions). Another way is to apply multiple hops (see Multi-hops).

When tramp detects a change in the operating system version in a remote host (via the command uname -sr), it flushes all connection related information for that host and creates a new entry.