This is tramp.info, produced by makeinfo version 6.5 from tramp.texi. Copyright © 1999–2021 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being “A GNU Manual”, and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License”. (a) The FSF’s Back-Cover Text is: “You have the freedom to copy and modify this GNU manual.” INFO-DIR-SECTION Emacs network features START-INFO-DIR-ENTRY * Tramp: (tramp). Transparent Remote Access, Multiple Protocol Emacs remote file access via ssh and scp. END-INFO-DIR-ENTRY  File: tramp.info, Node: Top, Next: Overview, Prev: (dir), Up: (dir) TRAMP 2.5.1 User Manual *********************** This file documents TRAMP 2.5.1, a remote file editing package for Emacs. TRAMP stands for “Transparent Remote (file) Access, Multiple Protocol”. This package provides remote file editing, similar to Ange FTP. The difference is that Ange FTP uses FTP to transfer files between the local and the remote host, whereas TRAMP uses a combination of ‘rsh’ and ‘rcp’ or other work-alike programs, such as ‘ssh’/‘scp’. You can find the latest version of this document on the web at . There is a mailing list for TRAMP, available at , and archived at the TRAMP Mail Archive (https://lists.gnu.org/r/tramp-devel/). Copyright © 1999–2021 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, with the Front-Cover Texts being “A GNU Manual”, and with the Back-Cover Texts as in (a) below. A copy of the license is included in the section entitled “GNU Free Documentation License”. (a) The FSF’s Back-Cover Text is: “You have the freedom to copy and modify this GNU manual.” * Menu: * Overview:: What TRAMP can and cannot do. For the end user: * Obtaining TRAMP:: How to obtain TRAMP. * Quick Start Guide:: Short introduction how to use TRAMP. * Configuration:: Configuring TRAMP for use. * Usage:: An overview of the operation of TRAMP. * Bug Reports:: Reporting Bugs and Problems. * Frequently Asked Questions:: Questions and answers from the mailing list. For the developer: * Files directories and localnames:: How file names, directories and localnames are mangled and managed. * Traces and Profiles:: How to Customize Traces. * GNU Free Documentation License:: The license for this documentation. * Function Index:: TRAMP functions. * Variable Index:: User options and variables. * Concept Index:: An item for each concept. — The Detailed Node Listing — Configuring TRAMP for use * Connection types:: Types of connections to remote hosts. * Inline methods:: Inline methods. * External methods:: External methods. * GVFS-based methods:: GVFS-based external methods. * FUSE-based methods:: FUSE-based external methods. * Default Method:: Selecting a default method. * Default User:: Selecting a default user. * Default Host:: Selecting a default host. * Multi-hops:: Connecting to a remote host using multiple hops. * Firewalls:: Passing firewalls. * Customizing Methods:: Using Non-Standard Methods. * Customizing Completion:: Selecting config files for user/host name completion. * Password handling:: Reusing passwords for several connections. * Connection caching:: Reusing connection related information. * Predefined connection information:: Setting own connection related information. * Remote programs:: How TRAMP finds and uses programs on the remote host. * Remote shell setup:: Remote shell setup hints. * FUSE setup:: FUSE setup hints. * Android shell setup:: Android shell setup hints. * Auto-save and Backup:: Auto-save and Backup. * Keeping files encrypted:: Protect remote files by encryption. * Windows setup hints:: Issues with Cygwin ssh. Using TRAMP * File name syntax:: TRAMP file name conventions. * Change file name syntax:: Alternative file name syntax. * File name completion:: File name completion. * Ad-hoc multi-hops:: Declaring multiple hops in the file name. * Remote processes:: Integration with other Emacs packages. * Cleanup remote connections:: Cleanup remote connections. * Renaming remote files:: Renaming remote files. * Archive file names:: Access to files in file archives. How file names, directories and localnames are mangled and managed * Localname deconstruction:: Breaking a localname into its components. * External packages:: Integration with external Lisp packages.  File: tramp.info, Node: Overview, Next: Obtaining TRAMP, Up: Top 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 ‘rsh’, ‘rlogin’, ‘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 ‘’ for completion. If this is the first time connecting to that host, here’s what happens: • TRAMP invokes ‘telnet HOST’ or ‘rsh HOST -l USER’ and establishes an external process to connect to the remote host. TRAMP communicates with the process through an Emacs buffer, which also shows output from the remote host. • The remote host may prompt for a login name (for ‘telnet’, for example) in the buffer. If on the other hand, the login name was included in the file name portion, TRAMP sends the login name followed by a newline. • The remote host may then prompt for a password or passphrase (for ‘rsh’ or for ‘telnet’). TRAMP displays the password prompt in the minibuffer. TRAMP then sends whatever is entered to the remote host, followed by a newline. • TRAMP now waits for either the shell prompt or a failed login message. If TRAMP does not receive any messages within a timeout period (a minute, for example), then TRAMP responds with an error message about not finding the remote shell prompt. If there are any messages from the remote host, TRAMP displays them in the buffer. For any ‘login failed’ message from the remote host, TRAMP aborts the login attempt, and repeats the login steps. • Upon successful login, if TRAMP recognizes the shell prompt from the remote host, TRAMP prepares the shell environment by turning off echoing, setting the shell prompt, and other housekeeping chores. *Note* that for the remote shell, TRAMP invokes ‘/bin/sh’. The remote host must recognize ‘exec /bin/sh’ and execute the appropriate shell. This shell must support Bourne shell syntax. • TRAMP executes ‘cd’ and ‘ls’ commands to find which files exist on the remote host. TRAMP sometimes uses ‘echo’ with globbing. TRAMP checks if a file or directory is writable with ‘test’. After each command, TRAMP parses the output from the remote host for completing the next operation. • After remote file name completion, TRAMP transfers the file contents from the remote host. For inline transfers, TRAMP sends a command, such as ‘mimencode -b /path/to/remote/file’, waits until the output has accumulated in the buffer, then decodes that output to produce the file’s contents. For external transfers, TRAMP sends a command as follows: rcp user@host:/path/to/remote/file /tmp/tramp.4711 TRAMP reads the local temporary file ‘/tmp/tramp.4711’ into a buffer, and then deletes the temporary file. • Edit, modify, change the buffer contents as normal, and then save the buffer with ‘C-x C-s’. • TRAMP transfers the buffer contents to the remote host in a reverse of the process using the appropriate inline or external program. I hope this has provided you with a basic overview of what happens behind the scenes when you open a file with TRAMP.  File: tramp.info, Node: Obtaining TRAMP, Next: Quick Start Guide, Prev: Overview, Up: Top 2 Obtaining TRAMP ***************** TRAMP is included as part of Emacs (since Emacs 22.1). TRAMP is also freely packaged for download on the Internet at . The version number of TRAMP can be obtained by the variable ‘tramp-version’. For released TRAMP versions, this is a three-number string like “2.4.5”. A TRAMP release, which is packaged with Emacs, could differ slightly from the corresponding standalone release. This is because it isn’t always possible to synchronize release dates between Emacs and TRAMP. Such version numbers have the Emacs version number as suffix, like “2.4.5.27.2”. This means TRAMP 2.4.5 as integrated in Emacs 27.2. A complete list of TRAMP versions packaged with Emacs can be retrieved by (assoc 'Tramp customize-package-emacs-version-alist) TRAMP is also available as GNU ELPA (https://elpa.gnu.org) package. Besides the standalone releases, further minor versions of TRAMP will appear on GNU ELPA, until the next TRAMP release appears. These minor versions have a four-number string, like “2.4.5.1”. TRAMP development versions are available on Git servers. Development versions contain new and incomplete features. The development version of TRAMP is always the version number of the next release, plus the suffix “-pre”, like “2.4.4-pre”. One way to obtain TRAMP from the Git server is to visit the Savannah project page at the following URL and then clicking on the Git link in the navigation bar at the top. Another way is to follow the terminal session below: $ cd ~/emacs $ git clone git://git.savannah.gnu.org/tramp.git From behind a proxy: $ git config --global http.proxy http://user:pwd@proxy.server.com:8080 $ git clone https://git.savannah.gnu.org/r/tramp.git TRAMP developers: $ git clone login@git.sv.gnu.org:/srv/git/tramp.git After one of the above commands, ‘~/emacs/tramp’ will containing the latest version of TRAMP. To fetch updates from the repository, use ‘git pull’: $ cd ~/emacs/tramp $ git pull Run ‘autoconf’ as follows to generate an up-to-date ‘configure’ script: $ cd ~/emacs/tramp $ autoconf See the file ‘INSTALL’ in that directory for further information on how to install TRAMP.  File: tramp.info, Node: Quick Start Guide, Next: Configuration, Prev: Obtaining TRAMP, Up: Top 3 Short introduction how to use TRAMP ************************************* TRAMP extends the Emacs file name syntax by adding a remote component. A remote file name always looks like ‘/method:user@host:/path/to/file’. You can use remote files exactly like ordinary files, that means you can open a file or directory by ‘C-x C-f /method:user@host:/path/to/file ’, edit the file, and save it. You can also mix local files and remote files in file operations with two arguments, like ‘copy-file’ or ‘rename-file’. And finally, you can even run processes on a remote host, when the buffer you call the process from has a remote ‘default-directory’. 3.1 File name syntax ==================== Remote file names have ‘method’, ‘user’ and ‘host’ parts prepended. All of them, and also the local file name part, are optional, in case of a missing part a default value is assumed. The default value for an empty local file name part is the remote user’s home directory. The shortest remote file name is thus ‘/-::’. The ‘-’ notation for the default method is used for syntactical reasons, *note Default Method::. The ‘method’ part describes the connection method used to reach the remote host, see below. The ‘user’ part is the user name for accessing the remote host. For the ‘smb’ method, this could also require a domain name, in which case it is written as ‘user%domain’. The ‘host’ part must be a host name which can be resolved on your local host. It could be a short host name, a fully qualified domain name, an IPv4 or IPv6 address, *note File name syntax::. Some connection methods also support a notation for the port to be used, in which case it is written as ‘host#port’. 3.2 Using ‘ssh’ and ‘plink’ =========================== If your local host runs an SSH client, and the remote host runs an SSH server, the simplest remote file name is ‘/ssh:user@host:/path/to/file’. The remote file name ‘/ssh::’ opens a remote connection to yourself on the local host, and is often used for testing TRAMP. On MS Windows, PuTTY is often used as the SSH client. Its ‘plink’ method can be used there to open a connection to a remote host running an ‘ssh’ server: ‘/plink:user@host:/path/to/file’. 3.3 Using ‘su’, ‘sudo’, ‘doas’ and ‘sg’ ======================================= Sometimes, it is necessary to work on your local host under different permissions. For this, you can use the ‘su’ or ‘sudo’ connection method. On OpenBSD systems, the ‘doas’ connection method offers the same functionality. These methods use ‘root’ as default user name and the return value of ‘(system-name)’ as default host name. Therefore, it is convenient to open a file as ‘/sudo::/path/to/file’. The method ‘sg’ stands for “switch group”; here the user name is used as the group to change to. The default host name is the same. 3.4 Combining ‘ssh’ or ‘plink’ with ‘su’, ‘sudo’ or ‘doas’ ========================================================== If the ‘su’, ‘sudo’ or ‘doas’ option should be performed on another host, it can be comnbined with a leading ‘ssh’ or ‘plink’ option. That means that TRAMP connects first to the other host with non-administrative credentials, and changes to administrative credentials on that host afterwards. In a simple case, the syntax looks like ‘/ssh:user@host|sudo::/path/to/file’. *Note Ad-hoc multi-hops::. 3.5 Using ‘sudoedit’ ==================== The ‘sudoedit’ method is similar to the ‘sudo’ method. However, it is a different implementation: it does not keep an open session running in the background. This is for security reasons; on the backside this method has worse performance than the ‘sudo’ method, it is restricted to ‘localhost’ only, and it does not support external processes. 3.6 Using ‘smbclient’ ===================== In order to access a remote MS Windows host or Samba server, the ‘smbclient’ client is used. The remote file name syntax is ‘/smb:user%domain@host:/path/to/file’. The first part of the local file name is the share exported by the remote host, ‘path’ in this example. 3.7 Using GVFS-based methods ============================ On systems which have GVFS (the GNOME Virtual File System) installed, its offered methods can be used by TRAMP. Examples are ‘/sftp:user@host:/path/to/file’, ‘/afp:user@host:/path/to/file’ (accessing Apple’s AFP file system), ‘/dav:user@host:/path/to/file’, ‘/davs:user@host:/path/to/file’ (for WebDAV shares) and ‘/mtp:device:/path/to/file’ (for media devices). 3.8 Using GNOME Online Accounts based methods ============================================= GVFS-based methods also include GNOME Online Accounts, which support the ‘Files’ service. These are the Google Drive file system, and the OwnCloud/NextCloud file system. The file name syntax here is always ‘/gdrive:john.doe@gmail.com:/path/to/file’ (‘john.doe@gmail.com’ stands here for your Google Drive account), or ‘/nextcloud:user@host#8081:/path/to/file’ (‘8081’ stands for the port number) for OwnCloud/NextCloud files. 3.9 Using FUSE-based methods ============================ FUSE (Filesystem in Userspace) allows users to mount a virtual file system. It is also used by GVFS internally, but here we discuss methods which do not use the GVFS API. A convenient way to access system storages is the ‘rclone’ program. If you have configured a storage in ‘rclone’ under a name ‘storage’ (for example), you can access it via the remote file name syntax ‘/rclone:storage:/path/to/file’. User names are not needed. On local hosts which have installed the ‘sshfs’ client for mounting a file system based on ‘sftp’, this method can be used. All remote files are available via the local mount point. TRAMP aids in mounting the file system if it isn’t mounted yet, and it supports the access with the usual file name syntax ‘/sshfs:user@host:/path/to/file’. 3.10 Using Android ================== An Android device, which is connected via USB to your local host, can be accessed via the ‘adb’ command. No user or host name is needed. The file name syntax is ‘/adb::/path/to/file’.  File: tramp.info, Node: Configuration, Next: Usage, Prev: Quick Start Guide, Up: Top 4 Configuring TRAMP ******************* TRAMP is initially configured to use the ‘scp’ program to connect to the remote host. Just type ‘C-x C-f’ and then enter file name ‘/scp:user@host:/path/to/file’. For details, *Note Default Method::, *Note Default User::, *Note Default Host::. For problems related to the behavior of the remote shell, *Note Remote shell setup::. For changing the connection type and file access method from the defaults to one of several other options, *Note Connection types::. *Note* that some user options described in these examples are not auto loaded by Emacs. All examples require TRAMP to be installed and loaded: (customize-set-variable 'tramp-verbose 6 "Enable remote command traces") For functions used to configure TRAMP, the following clause may be used in your init file: (with-eval-after-load 'tramp (tramp-change-syntax 'simplified)) * Menu: * Connection types:: Types of connections to remote hosts. * Inline methods:: Inline methods. * External methods:: External methods. * GVFS-based methods:: GVFS-based external methods. * FUSE-based methods:: FUSE-based external methods. * Default Method:: Selecting a default method. Here we also try to help those who don’t have the foggiest which method is right for them. * Default User:: Selecting a default user. * Default Host:: Selecting a default host. * Multi-hops:: Connecting to a remote host using multiple hops. * Firewalls:: Passing firewalls. * Customizing Methods:: Using Non-Standard Methods. * Customizing Completion:: Selecting config files for user/host name completion. * Password handling:: Reusing passwords for several connections. * Connection caching:: Reusing connection related information. * Predefined connection information:: Setting own connection related information. * Remote programs:: How TRAMP finds and uses programs on the remote host. * Remote shell setup:: Remote shell setup hints. * FUSE setup:: FUSE setup hints. * Android shell setup:: Android shell setup hints. * Auto-save and Backup:: Auto-save and Backup. * Keeping files encrypted:: Protect remote files by encryption. * Windows setup hints:: Issues with Cygwin ssh.  File: tramp.info, Node: Connection types, Next: Inline methods, Up: Configuration 4.1 Types of connections to remote hosts ======================================== “Inline method” and “external method” are the two basic types of access methods. While they both use the same remote shell access programs, such as ‘rsh’, ‘ssh’, or ‘telnet’, they differ in the file access methods. Choosing the right method becomes important for editing files, transferring large files, or operating on a large number of files. The performance of the external methods is generally better than that of the inline methods, at least for large files. This is caused by the need to encode and decode the data when transferring inline. The one exception to this rule are the ‘scp’-based access methods. While these methods do see better performance when actually transferring files, the overhead of the cryptographic negotiation at startup may drown out the improvement in file transfer times. External methods should be configured in such a way that they don’t require a password (with ‘ssh-agent’, or similar). Modern ‘scp’ implementations offer options to reuse existing ‘ssh’ connections, which TRAMP enables by default if available. If that is not possible, you should consider *note Password handling::, otherwise you will be prompted for a password for every copy action.  File: tramp.info, Node: Inline methods, Next: External methods, Prev: Connection types, Up: Configuration 4.2 Inline methods ================== Inline methods use the same login connection to transfer file contents. Inline methods are quick and easy for small files. They depend on the availability of suitable encoding and decoding programs on the remote host. For local source and destination, TRAMP may use built-in equivalents of such programs in Emacs. Inline methods can work in situations where an external transfer program is unavailable. Inline methods also work when transferring files between different _user identities_ on the same host. TRAMP checks the remote host for the availability and usability of one of the commands defined in ‘tramp-remote-coding-commands’. TRAMP uses the first reliable command it finds. TRAMP’s search path can be customized, see *note Remote programs::. In case none of the commands are available, TRAMP first transfers a small Perl program to the remote host, and then tries to use that program for encoding and decoding. To increase transfer speeds for large text files, TRAMP can use compression before encoding. The user option ‘tramp-inline-compress-start-size’ specifies the file size above which to use this optimization. This feature depends on the availability and usability of one of the commands defined in ‘tramp-inline-compress-commands’. ‘rsh’ ‘rsh’ is an option for connecting to hosts within local networks since ‘rsh’ is not as secure as other methods. There should be no reason to use it, as ‘ssh’ is a both a complete replacement and ubiquitous. ‘ssh’ ‘ssh’ is a more secure option than others to connect to a remote host. ‘ssh’ can also take extra parameters as port numbers. For example, a host on port 42 is specified as ‘host#42’ (the real host name, a hash sign, then a port number). It is the same as passing ‘-p 42’ to the ‘ssh’ command. ‘telnet’ Connecting to a remote host with ‘telnet’ is as insecure as the ‘rsh’ method. ‘su’ Instead of connecting to a remote host, ‘su’ program allows editing as another user. The host can be either ‘localhost’ or the host returned by the function ‘(system-name)’. See *note Multi-hops:: for an exception to this behavior. ‘sudo’ Similar to ‘su’ method, ‘sudo’ uses ‘sudo’. ‘sudo’ must have sufficient rights to start a shell. For security reasons, a ‘sudo’ connection is disabled after a predefined timeout (5 minutes by default). This can be changed, see *note Predefined connection information::. ‘doas’ This method is used on OpenBSD like the ‘sudo’ command. Like the ‘sudo’ method, a ‘doas’ connection is disabled after a predefined timeout. ‘sg’ The ‘sg’ program allows editing as different group. The host can be either ‘localhost’ or the host returned by the function ‘(system-name)’. The user name must be specified, but it denotes a group name. See *note Multi-hops:: for an exception to this behavior. ‘sshx’ Works like ‘ssh’ but without the extra authentication prompts. ‘sshx’ uses ‘ssh -t -t -l USER -o RemoteCommand='/bin/sh -i' HOST’ to open a connection with a “standard” login shell. It supports changing the remote login shell ‘/bin/sh’. *Note* that ‘sshx’ does not bypass authentication questions. For example, if the host key of the remote host is not known, ‘sshx’ will still ask “Are you sure you want to continue connecting?”. TRAMP cannot handle such questions. Connections will have to be setup where logins can proceed without such questions. ‘sshx’ is useful for MS Windows users when ‘ssh’ triggers an error about allocating a pseudo tty. This happens due to missing shell prompts that confuses TRAMP. ‘sshx’ supports the ‘-p’ argument. ‘krlogin’ This method is also similar to ‘ssh’. It uses the ‘krlogin -x’ command only for remote host login. ‘ksu’ This is another method from the Kerberos suite. It behaves like ‘su’. ‘plink’ ‘plink’ method is for MS Windows users with the PuTTY implementation of SSH. It uses ‘plink -ssh’ to log in to the remote host. It supports changing the remote login shell ‘/bin/sh’. Check the ‘Share SSH connections if possible’ control for that session. ‘plink’ method supports the ‘-P’ argument. ‘plinkx’ Another method using PuTTY on MS Windows with session names instead of host names. ‘plinkx’ calls ‘plink -load SESSION -t’. User names and port numbers must be defined in the session. It supports changing the remote login shell ‘/bin/sh’. Check the ‘Share SSH connections if possible’ control for that session.  File: tramp.info, Node: External methods, Next: GVFS-based methods, Prev: Inline methods, Up: Configuration 4.3 External methods ==================== External methods operate over multiple channels, using the remote shell connection for some actions while delegating file transfers to an external transfer program. External methods save on the overhead of encoding and decoding of inline methods. Since external methods have the overhead of opening a new channel, files smaller than ‘tramp-copy-size-limit’ still use inline methods. ‘rcp’ This method uses the ‘rsh’ and ‘rcp’ commands to connect to the remote host and transfer files. This is the fastest access method available. The alternative method ‘remcp’ uses the ‘remsh’ and ‘rcp’ commands. ‘scp’ Using a combination of ‘ssh’ to connect and ‘scp’ to transfer is the most secure. While the performance is good, it is slower than the inline methods for smaller files. Though there is no overhead of encoding and decoding of the inline methods, ‘scp’’s cryptographic handshake negates those speed gains. ‘ssh’-based methods support ‘-p’ feature for specifying port numbers. For example, ‘host#42’ passes ‘-p 42’ in the argument list to ‘ssh’, and ‘-P 42’ in the argument list to ‘scp’. ‘rsync’ ‘ssh’ command to connect in combination with ‘rsync’ command to transfer is similar to the ‘scp’ method. ‘rsync’ performs much better than ‘scp’ when transferring files that exist on both hosts. However, this advantage is lost if the file exists only on one side of the connection. This method supports the ‘-p’ argument. ‘scpx’ ‘scpx’ is useful to avoid login shell questions. It is similar in performance to ‘scp’. ‘scpx’ uses ‘ssh -t -t -l USER -o RemoteCommand='/bin/sh -i' HOST’ to open a connection. It supports changing the remote login shell ‘/bin/sh’. ‘scpx’ is useful for MS Windows users when ‘ssh’ triggers an error about allocating a pseudo tty. This happens due to missing shell prompts that confuses TRAMP. This method supports the ‘-p’ argument. ‘pscp’ ‘psftp’ These methods are similar to ‘scp’ or ‘sftp’, but they use the ‘plink’ command to connect to the remote host, and they use ‘pscp’ or ‘psftp’ for transferring the files. These programs are part of PuTTY, an SSH implementation for MS Windows. They support changing the remote login shell ‘/bin/sh’. Check the ‘Share SSH connections if possible’ control for that session. These methods support the ‘-P’ argument. ‘fcp’ This method is similar to ‘scp’, but uses ‘fsh’ to connect and ‘fcp’ to transfer files. ‘fsh/fcp’, a front-end for ‘ssh’, reuse ‘ssh’ session by submitting several commands. This avoids the startup overhead due to ‘scp’’s secure connection. Inline methods have similar benefits. The command used for this connection is: ‘fsh HOST -l USER /bin/sh -i’ ‘fsh’ has no inline method since the multiplexing it offers is not useful for TRAMP. ‘fsh’ connects to remote host and TRAMP keeps that one connection open. ‘nc’ Using ‘telnet’ to connect and ‘nc’ to transfer files is sometimes the only combination suitable for accessing routers or NAS hosts. These dumb devices have severely restricted local shells, such as the ‘busybox’ and do not host any other encode or decode programs. ‘sudoedit’ The ‘sudoedit’ method allows to edit a file as a different user on the local host. You could regard this as TRAMP’s implementation of the ‘sudoedit’. Contrary to the ‘sudo’ method, all magic file name functions are implemented by single ‘sudo ...’ commands. The purpose is to make editing such a file as secure as possible; there must be no session running in the Emacs background which could be attacked from inside Emacs. Consequently, external processes are not implemented. The host name of such remote file names must represent the local host. Since the default value is already proper, it is recommended not to use any host name in the remote file name, like ‘/sudoedit::/path/to/file’ or ‘/sudoedit:user@:/path/to/file’. Like the ‘sudo’ method, a ‘sudoedit’ password expires after a predefined timeout. ‘ftp’ When TRAMP uses ‘ftp’, it forwards requests to whatever ftp program is specified by Ange FTP. This external program must be capable of servicing requests from TRAMP. ‘smb’ This non-native TRAMP method connects via the Server Message Block (SMB) networking protocol to hosts running file servers that are typically based on Samba or MS Windows. Using ‘smbclient’ requires a few tweaks when working with TRAMP: The first directory in the localname must be a share name on the remote host. Since some SMB share names end in the ‘$’ character, TRAMP must use ‘$$’ when specifying those shares to avoid environment variable substitutions. When TRAMP is not specific about the share name or uses the generic remote directory ‘/’, ‘smbclient’ returns all available shares. Since SMB authentication is based on each SMB share, TRAMP prompts for a password even when accessing a different share on the same SMB host. This prompting can be suppressed by *note Password handling::. To accommodate user name/domain name syntax required by MS Windows authorization, TRAMP provides for an extended syntax in ‘user%domain’ format (where ‘user’ is the user name, ‘%’ is the percent symbol, and ‘domain’ is the MS Windows domain name). An example: /smb:daniel%BIZARRE@melancholia:/daniel$$/.emacs where user ‘daniel’ connects as a domain user to the SMB host ‘melancholia’ in the MS Windows domain ‘BIZARRE’ to edit ‘.emacs’ located in the home directory (share ‘daniel$’). Alternatively, for local WINS users (as opposed to domain users), substitute the domain name with the name of the local host in UPPERCASE as shown here: /smb:daniel%MELANCHOLIA@melancholia:/daniel$$/.emacs where user ‘daniel’ connects as local user to the SMB host ‘melancholia’ in the local domain ‘MELANCHOLIA’ to edit ‘.emacs’ located in the home directory (share ‘daniel$’). The domain name and user name are optional for ‘smbclient’ authentication. When user name is not specified, ‘smbclient’ uses the anonymous user (without prompting for password). This behavior is unlike other TRAMP methods, where local user name is substituted. The ‘smb’ method is unavailable if Emacs is run under a local user authentication context in MS Windows. However such users can still access remote files using UNC file names instead of TRAMP: //melancholia/daniel$$/.emacs UNC file name specification does not allow the specification of a different user name for authentication like the ‘smbclient’ can. ‘adb’ This method uses Android Debug Bridge program for accessing Android devices. The Android Debug Bridge must be installed locally for TRAMP to work. Some GNU/Linux distributions provide Android Debug Bridge as an installation package. Alternatively, the program is installed as part of the Android SDK. TRAMP finds the ‘adb’ program either via the ‘PATH’ environment variable or the absolute path set in the user option ‘tramp-adb-program’. TRAMP connects to Android devices with ‘adb’ only when the user option ‘tramp-adb-connect-if-not-connected’ is not ‘nil’. Otherwise, the connection must be established outside Emacs. TRAMP does not require a host name part of the remote file name when a single Android device is connected to ‘adb’. TRAMP instead uses ‘/adb::’ as the default name. ‘adb devices’, run in a shell outside Emacs, shows available host names. ‘adb’ method normally does not need user name to authenticate on the Android device because it runs under the ‘adbd’ process. But when a user name is specified, however, TRAMP applies an ‘su’ in the syntax. When authentication does not succeed, especially on un-rooted Android devices, TRAMP displays login errors. For Android devices connected through TCP/IP, a port number can be specified using ‘device#42’ host name syntax or TRAMP can use the default value as declared in ‘adb’ command. Port numbers are not applicable to Android devices connected through USB.  File: tramp.info, Node: GVFS-based methods, Next: FUSE-based methods, Prev: External methods, Up: Configuration 4.4 GVFS-based external methods =============================== GVFS is the virtual file system for the GNOME Desktop, . Remote files on GVFS are mounted locally through FUSE and TRAMP uses this locally mounted directory internally. Emacs uses the D-Bus mechanism to communicate with GVFS. Emacs must have the message bus system, D-Bus integration active, *note D-Bus: (dbus)Top. ‘afp’ This method is for connecting to remote hosts with the Apple Filing Protocol for accessing files on macOS volumes. TRAMP access syntax requires a leading volume (share) name, for example: ‘/afp:user@host:/volume’. ‘dav’ ‘davs’ ‘dav’ method provides access to WebDAV files and directories based on standard protocols, such as HTTP. ‘davs’ does the same but with SSL encryption. Both methods support the port numbers. Paths being part of the WebDAV volume to be mounted by GVFS, as it is common for OwnCloud or NextCloud file names, are not supported by these methods. See method ‘nextcloud’ for handling them. ‘gdrive’ Via the ‘gdrive’ method it is possible to access your Google Drive online storage. User and host name of the remote file name are your email address of the Google Drive credentials, like ‘/gdrive:john.doe@gmail.com:/’. These credentials must be populated in your ‘Online Accounts’ application outside Emacs. Since Google Drive uses cryptic blob file names internally, TRAMP works with the ‘display-name’ of the files. This could produce unexpected behavior in case two files in the same directory have the same ‘display-name’, such a situation must be avoided. ‘mtp’ Media devices, like cell phones, tablets, cameras, can be accessed via the ‘mtp’ method. Just the device name is needed in order to specify the host in the file name. However, the device must already be connected via USB, before accessing it. Possible device names are visible via host name completion, *note File name completion::. Depending on the device type, the access could be read-only. Some devices are accessible under different names in parallel, offering different parts of their file system. TRAMP does not require a host name as part of the remote file name when a single media device is connected. TRAMP instead uses ‘/mtp::’ as the default name. ‘nextcloud’ As the name indicates, the method ‘nextcloud’ allows you to access OwnCloud or NextCloud hosted files and directories. Like the ‘gdrive’ method, your credentials must be populated in your ‘Online Accounts’ application outside Emacs. The method supports port numbers. ‘sftp’ This method uses ‘sftp’ in order to securely access remote hosts. ‘sftp’ is a more secure option for connecting to hosts that for security reasons refuse ‘ssh’ connections. When there is a respective entry in your ‘ssh’ configuration, do _not_ set the ‘RemoteCommand’ option. -- User Option: tramp-gvfs-methods This user option is a list of external methods for GVFS. By default, this list includes ‘afp’, ‘dav’, ‘davs’, ‘gdrive’, ‘mtp’, ‘nextcloud’ and ‘sftp’. Other methods to include are ‘ftp’, ‘http’, ‘https’ and ‘smb’. These methods are not intended to be used directly as GVFS-based method. Instead, they are added here for the benefit of *note Archive file names::. If you want to use GVFS-based ‘ftp’ or ‘smb’ methods, you must add them to ‘tramp-gvfs-methods’, and you must disable the corresponding Tramp package by setting ‘tramp-ftp-method’ or ‘tramp-smb-method’ to ‘nil’, respectively: (add-to-list 'tramp-gvfs-methods "ftp") (customize-set-variable 'tramp-ftp-method nil)  File: tramp.info, Node: FUSE-based methods, Next: Default Method, Prev: GVFS-based methods, Up: Configuration 4.5 FUSE-based external methods =============================== Besides GVFS, there are other virtual file systems using the FUSE interface. Remote files are mounted locally through FUSE and TRAMP uses this locally mounted directory internally. When possible, TRAMP maps the remote file names to their respective local file name, and applies the file name operation on them. For some of the file name operations this is not possible, TRAMP emulates those operations otherwise. ‘rclone’ The program ‘rclone’ allows to access different system storages in the cloud, see for a list of supported systems. If the ‘rclone’ program isn’t found in your ‘PATH’ environment variable, you can tell TRAMP its absolute path via the user option ‘tramp-rclone-program’. A system storage must be configured via the ‘rclone config’ command, outside Emacs. If you have configured a storage in ‘rclone’ under a name ‘storage’ (for example), you could access it via the remote file name /rclone:storage:/path/to/file User names are part of the ‘rclone’ configuration, and not needed in the remote file name. If a user name is contained in the remote file name, it is ignored. Internally, TRAMP mounts the remote system storage at location ‘/tmp/tramp.rclone.storage’, with ‘storage’ being the name of the configured system storage. The mount point and optional flags to the different ‘rclone’ operations could be passed as connection properties, *Note Setup of rclone method::. Access via ‘rclone’ is slow. If you have an alternative method for accessing the system storage, you should use it. *note GVFS-based methods:: for example, methods ‘gdrive’ and ‘nextcloud’. ‘sshfs’ On local hosts which have installed the ‘sshfs’ client for mounting a file system based on ‘sftp’, this method can be used, see . If the ‘sshfs’ program isn’t found in your ‘PATH’ environment variable, you can tell TRAMP its absolute path via the user option ‘tramp-sshfs-program’. All remote files are available via the local mount point. TRAMP aids in mounting the file system if it isn’t mounted yet. The remote file name syntax is /sshfs:user@host#port:/path/to/file User name and port number are optional. This method does not support password handling, the file system must either be mounted already, or the connection must be established passwordless via ssh keys. The mount point and mount arguments could be passed as connection properties, *Note Setup of sshfs method::.  File: tramp.info, Node: Default Method, Next: Default User, Prev: FUSE-based methods, Up: Configuration 4.6 Selecting a default method ============================== In a remote file name, the use of a default method is indicated by the pseudo method ‘-’, *note File name syntax::. -- User Option: tramp-default-method Default method is for transferring files. The user option ‘tramp-default-method’ sets it. TRAMP uses this user option to determine the default method for remote file names that do not have one specified. (customize-set-variable 'tramp-default-method "ssh") -- User Option: tramp-default-method-alist Default methods for transferring files can be customized for specific user and host combinations through the user option ‘tramp-default-method-alist’. For example, the following two lines specify to use the ‘ssh’ method for all user names matching ‘john’ and the ‘rsync’ method for all host names matching ‘lily’. The third line specifies to use the ‘su’ method for the user ‘root’ on the host ‘localhost’. (add-to-list 'tramp-default-method-alist '("" "john" "ssh")) (add-to-list 'tramp-default-method-alist '("lily" "" "rsync")) (add-to-list 'tramp-default-method-alist '("\\`localhost\\'" "\\`root\\'" "su")) External methods performance faster for large files. *note Inline methods::. *note External methods::. Choosing the access method also depends on the security environment. For example, ‘rsh’ and ‘telnet’ methods that use clear text password transfers are inappropriate for over the Internet connections. Secure remote connections should use ‘ssh’ that provide encryption. 4.6.1 Which method to use? -------------------------- TRAMP provides maximum number of choices for maximum flexibility. Choosing which method depends on the hosts, clients, network speeds, and the security context. Start by using an inline method. External methods might be more efficient for large files, but most TRAMP users edit small files more often than large files. Enable compression, ‘tramp-inline-compress-start-size’, for a performance boost for large files. Since ‘ssh’ has become the most common method of remote host access and it has the most reasonable security protocols, use ‘ssh’ method. Typical ‘ssh’ usage to edit the ‘/etc/motd’ file on the otherhost: C-x C-f /ssh:root@otherhost:/etc/motd If ‘ssh’ is unavailable for whatever reason, look for other obvious options. For MS Windows, try the ‘plink’ method. For Kerberos, try ‘krlogin’. For editing local files as ‘su’ or ‘sudo’ methods, try the shortened syntax of ‘root’: C-x C-f /su::/etc/motd For editing large files, ‘scp’ is faster than ‘ssh’. ‘pscp’ is faster than ‘plink’. But this speed improvement is not always true.  File: tramp.info, Node: Default User, Next: Default Host, Prev: Default Method, Up: Configuration 4.7 Selecting a default user ============================ -- User Option: tramp-default-user A TRAMP file name can omit the user name part since TRAMP substitutes the currently logged-in user name. However this substitution can be overridden with ‘tramp-default-user’. For example: (customize-set-variable 'tramp-default-user "root") -- User Option: tramp-default-user-alist Instead of a single default user, ‘tramp-default-user-alist’ allows multiple default user values based on access method or host name combinations. The alist can hold multiple values. For example, to use the ‘john’ as the default user for the domain ‘somewhere.else’ only: (add-to-list 'tramp-default-user-alist '("ssh" ".*\\.somewhere\\.else\\'" "john")) A Caution: TRAMP will override any default user specified in the configuration files outside Emacs, such as ‘~/.ssh/config’. To stop TRAMP from applying the default value, set the corresponding alist entry to ‘nil’: (add-to-list 'tramp-default-user-alist '("ssh" "\\`here\\.somewhere\\.else\\'" nil)) The last entry in ‘tramp-default-user-alist’ should be reserved for catch-all or most often used login. (add-to-list 'tramp-default-user-alist '(nil nil "jonas") t)  File: tramp.info, Node: Default Host, Next: Multi-hops, Prev: Default User, Up: Configuration 4.8 Selecting a default host ============================ -- User Option: tramp-default-host When host name is omitted, TRAMP substitutes the value from the ‘tramp-default-host’ user option. It is initially populated with the local host name where Emacs is running. The default method, default user and default host can be overridden as follows: (custom-set-variables '(tramp-default-method "ssh") '(tramp-default-user "john") '(tramp-default-host "target")) With all defaults set, ‘/-::’ will connect TRAMP to John’s home directory on ‘target’ via ‘ssh’. -- User Option: tramp-default-host-alist Instead of a single default host, ‘tramp-default-host-alist’ allows multiple default host values based on access method or user name combinations. The alist can hold multiple values. While ‘tramp-default-host’ is sufficient in most cases, some methods, like ‘adb’, require defaults overwritten.  File: tramp.info, Node: Multi-hops, Next: Firewalls, Prev: Default Host, Up: Configuration 4.9 Connecting to a remote host using multiple hops =================================================== Multi-hops are methods to reach hosts behind firewalls or to reach the outside world from inside a bastion host. With multi-hops, TRAMP can negotiate these hops with the appropriate user/host authentication at each hop. All methods until now have been the single hop kind, where the start and end points of the connection did not have intermediate check points. -- User Option: tramp-default-proxies-alist ‘tramp-default-proxies-alist’ specifies proxy hosts to pass through. This user option is list of triples consisting of ‘(HOST USER PROXY)’. The first match is the proxy host through which passes the file name and the target host matching USER@HOST. HOST and USER are regular expressions or ‘nil’, interpreted as a regular expression which always matches. PROXY is a literal TRAMP file name whose local name part is ignored, and the method and user name parts are optional. The method must be an inline method (*note Inline methods::). If PROXY is ‘nil’, no additional hop is required reaching USER@HOST. For example, to pass through the host ‘bastion.your.domain’ as user ‘bird’ to reach remote hosts outside the local domain: (add-to-list 'tramp-default-proxies-alist '("\\." nil "/ssh:bird@bastion.your.domain:")) (add-to-list 'tramp-default-proxies-alist '("\\.your\\.domain\\'" nil nil)) *Note*: ‘add-to-list’ adds elements at the beginning of a list. Therefore, most relevant rules must come last in the list. Proxy hosts can be cascaded in the alist. If there is another host called ‘jump.your.domain’, which is the only host allowed to connect to ‘bastion.your.domain’, then: (add-to-list 'tramp-default-proxies-alist '("\\`bastion\\.your\\.domain\\'" "\\`bird\\'" "/ssh:jump.your.domain:")) PROXY can take patterns ‘%h’ or ‘%u’ for HOST or USER respectively. Ports or domains, if they are part of a hop file name, are not expanded by those patterns. To login as ‘root’ on remote hosts in the domain ‘your.domain’, but login as ‘root’ is disabled for non-local access, then use this alist entry: (add-to-list 'tramp-default-proxies-alist '("\\.your\\.domain\\'" "\\`root\\'" "/ssh:%h:")) Opening ‘/sudo:randomhost.your.domain:’ first connects to ‘randomhost.your.domain’ via ‘ssh’ under your account name, and then performs ‘sudo -u root’ on that host. It is key for the ‘sudo’ method in the above example to be applied on the host after reaching it and not on the local host. TRAMP checks therefore, that the host name for such hops matches the host name of the previous hop. HOST, USER and PROXY can also take Lisp forms. These forms when evaluated must return either a string or ‘nil’. To generalize (from the previous example): For all hosts, except my local one, first connect via ‘ssh’, and then apply ‘sudo -u root’: (add-to-list 'tramp-default-proxies-alist '(nil "\\`root\\'" "/ssh:%h:")) (add-to-list 'tramp-default-proxies-alist '((regexp-quote (system-name)) nil nil)) Passing through hops involves dealing with restricted shells, such as ‘rbash’. If TRAMP is made aware, then it would use them for proxies only. -- User Option: tramp-restricted-shell-hosts-alist An alist of regular expressions of hosts running restricted shells, such as ‘rbash’. TRAMP will then use them only as proxies. To specify the bastion host from the example above as running a restricted shell: (add-to-list 'tramp-restricted-shell-hosts-alist "\\`bastion\\.your\\.domain\\'")  File: tramp.info, Node: Firewalls, Next: Customizing Methods, Prev: Multi-hops, Up: Configuration 4.10 Passing firewalls ====================== Sometimes, it is not possible to reach a remote host directly. A firewall might be in the way, which could be passed via a proxy server. Both ssh and PuTTY support such proxy settings, using an HTTP tunnel via the ‘CONNECT’ command (conforming to RFC 2616, 2817 specifications). Proxy servers using HTTP 1.1 or later protocol support this command. 4.10.1 Tunneling with ssh ------------------------- With ‘ssh’, you could use the ‘ProxyCommand’ entry in ‘~/.ssh/config’: Host host.other.domain ProxyCommand nc -X connect -x proxy.your.domain:3128 %h %p ‘nc’ is BSD’s netcat program, which establishes HTTP tunnels. Any other program with such a feature could be used as well. In the example, opening ‘/ssh:host.your.domain:’ passes the HTTP proxy server ‘proxy.your.domain’ on port 3128. 4.10.2 Tunneling with PuTTY --------------------------- PuTTY does not need an external program, HTTP tunnel support is built-in. In the PuTTY config program, create a session for ‘host.your.domain’. In the ‘Connection/Data’ entry, select the ‘HTTP’ option, and add ‘proxy.your.domain’ as ‘Proxy hostname’, and 3128 as ‘Port’. Opening ‘/plinkx:host.your.domain:’ passes the HTTP proxy server ‘proxy.your.domain’ on port 3128.  File: tramp.info, Node: Customizing Methods, Next: Customizing Completion, Prev: Firewalls, Up: Configuration 4.11 Using Non-Standard Methods =============================== The ‘tramp-methods’ variable currently has an exhaustive list of predefined methods. Any part of this list can be modified with more suitable settings. Refer to the Lisp documentation of that variable, accessible with ‘C-h v tramp-methods ’. In the ELPA archives, there are several examples of such extensions. They can be installed with Emacs’s Package Manager. This includes ‘docker-tramp’ Integration for Docker containers. A container is accessed via ‘/docker:user@container:/path/to/file’, where ‘user’ is the (optional) user that you want to use, and ‘container’ is the id or name of the container. ‘kubernetes-tramp’ Integration for Docker containers deployed in a Kubernetes cluster. It is derived from ‘docker-tramp’. A container is accessed via ‘/kubectl:user@container:/path/to/file’, ‘user’ and ‘container’ have the same meaning as in ‘docker-tramp’. ‘lxc-tramp’ Integration for LXC containers. A container is accessed via ‘/lxc:container:/path/to/file’, ‘container’ has the same meaning as in ‘docker-tramp’. A ‘user’ specification is ignored. ‘lxd-tramp’ Integration for LXD containers. A container is accessed via ‘/lxd:user@container:/path/to/file’, ‘user’ and ‘container’ have the same meaning as in ‘docker-tramp’. ‘magit-tramp’ Browsing Git repositories with ‘magit’. A versioned file is accessed via ‘/git:rev@root-dir:/path/to/file’. ‘rev’ is a Git revision, and ‘root-dir’ is a virtual host name for the root directory, specified in ‘magit-tramp-hosts-alist’. ‘tramp-hdfs’ Access of a hadoop/hdfs file system. A file is accessed via ‘/hdfs:user@node:/path/to/file’, where ‘user’ is the user that you want to use, and ‘node’ is the name of the hadoop server. ‘vagrant-tramp’ Convenience method to access vagrant boxes. It is often used in multi-hop file names like ‘/vagrant:box|sudo:box:/path/to/file’, where ‘box’ is the name of the vagrant box.  File: tramp.info, Node: Customizing Completion, Next: Password handling, Prev: Customizing Methods, Up: Configuration 4.12 Selecting config files for user/host name completion ========================================================= ‘tramp-completion-function-alist’ uses predefined files for user and host name completion (*note File name completion::). For each method, it keeps a set of configuration files and a function that can parse that file. Each entry in ‘tramp-completion-function-alist’ is of the form (METHOD PAIR1 PAIR2 ...). Each PAIR is composed of (FUNCTION FILE). FUNCTION is responsible for extracting user names and host names from FILE for completion. There are two functions which access this variable: -- Function: tramp-get-completion-function method This function returns the list of completion functions for METHOD. Example: (tramp-get-completion-function "rsh") ⇒ ((tramp-parse-rhosts "/etc/hosts.equiv") (tramp-parse-rhosts "~/.rhosts")) -- Function: tramp-set-completion-function method function-list This function sets FUNCTION-LIST as list of completion functions for METHOD. Example: (tramp-set-completion-function "ssh" '((tramp-parse-sconfig "/etc/ssh_config") (tramp-parse-sconfig "~/.ssh/config"))) ⇒ ((tramp-parse-sconfig "/etc/ssh_config") (tramp-parse-sconfig "~/.ssh/config")) The following predefined functions parsing configuration files exist: ‘tramp-parse-rhosts’ This function parses files which are syntactical equivalent to ‘~/.rhosts’. It returns both host names and user names, if specified. ‘tramp-parse-shosts’ This function parses files which are syntactical equivalent to ‘~/.ssh/known_hosts’. Since there are no user names specified in such files, it can return host names only. ‘tramp-parse-sconfig’ This function returns the host nicknames defined by ‘Host’ entries in ‘~/.ssh/config’ style files. ‘tramp-parse-shostkeys’ SSH2 parsing of directories ‘/etc/ssh2/hostkeys/*’ and ‘~/ssh2/hostkeys/*’. Hosts are coded in file names ‘hostkey_PORTNUMBER_HOST-NAME.pub’. User names are always ‘nil’. ‘tramp-parse-sknownhosts’ Another SSH2 style parsing of directories like ‘/etc/ssh2/knownhosts/*’ and ‘~/ssh2/knownhosts/*’. This case, hosts names are coded in file names ‘HOST-NAME.ALGORITHM.pub’. User names are always ‘nil’. ‘tramp-parse-hosts’ A function dedicated to ‘/etc/hosts’ for host names. ‘tramp-parse-passwd’ A function which parses ‘/etc/passwd’ for user names. ‘tramp-parse-etc-group’ A function which parses ‘/etc/group’ for group names. ‘tramp-parse-netrc’ A function which parses ‘~/.netrc’ and ‘~/.authinfo’-style files. To keep a custom file with custom data in a custom structure, a custom function has to be provided. This function must meet the following conventions: -- Function: my-tramp-parse file FILE must be either a file on the host, or ‘nil’. The function must return a list of (USER HOST), which are taken as candidates for completion for user and host names. Example: (my-tramp-parse "~/.my-tramp-hosts") ⇒ ((nil "toto") ("daniel" "melancholia"))  File: tramp.info, Node: Password handling, Next: Connection caching, Prev: Customizing Completion, Up: Configuration 4.13 Reusing passwords for several connections ============================================== To avoid repeated prompts for passwords, consider native caching mechanisms, such as ‘ssh-agent’ for ‘ssh’-like methods, or ‘pageant’ for ‘plink’-like methods. TRAMP offers alternatives when native solutions cannot meet the need. 4.13.1 Using an authentication file ----------------------------------- The package ‘auth-source.el’, originally developed for No Gnus, reads passwords from different sources, *Note auth-source: (auth)Help for users. The default authentication file is ‘~/.authinfo.gpg’, but this can be changed via the user option ‘auth-sources’. A typical entry in the authentication file: machine melancholia port scp login daniel password geheim The port can take any TRAMP method (*note Inline methods::, *note External methods::). Omitting port values matches all TRAMP methods. Domain and ports, as used in TRAMP file name syntax, must be appended to the machine and login items: machine melancholia#4711 port davs login daniel%BIZARRE password geheim If no proper entry exists, the password is read interactively. After successful login (verification of the password), Emacs offers to save a corresponding entry for further use by ‘auth-source’ backends which support this. This can be changed by setting the user option ‘auth-source-save-behavior’ to ‘nil’. Set ‘auth-source-debug’ to ‘t’ to debug messages. *Note* that ‘auth-source.el’ is not used for ‘ftp’ connections, because TRAMP passes the work to Ange FTP. If you want, for example, use your ‘~/.authinfo.gpg’ authentication file, you must customize ‘ange-ftp-netrc-filename’: (customize-set-variable 'ange-ftp-netrc-filename "~/.authinfo.gpg") In case you do not want to use an authentication file for TRAMP passwords, use connection-local variables (*note (emacs)Connection Variables::) like this: (connection-local-set-profile-variables 'remote-without-auth-sources '((auth-sources . nil))) (connection-local-set-profiles '(:application tramp) 'remote-without-auth-sources) 4.13.2 Caching passwords ------------------------ TRAMP can cache passwords as entered and reuse when needed for the same user or host name independent of the access method. ‘password-cache-expiry’ sets the duration (in seconds) the passwords are remembered. Passwords are never saved permanently nor can they extend beyond the lifetime of the current Emacs session. Set ‘password-cache-expiry’ to ‘nil’ to disable expiration. Set ‘password-cache’ to ‘nil’ to disable password caching.  File: tramp.info, Node: Connection caching, Next: Predefined connection information, Prev: Password handling, Up: Configuration 4.14 Reusing connection related information =========================================== For faster initial connection times, TRAMP stores previous connection properties in a file specified by the user option ‘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. 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.  File: tramp.info, Node: Predefined connection information, Next: Remote programs, Prev: Connection caching, Up: Configuration 4.15 Setting own connection related information =============================================== For more precise customization, parameters specified by ‘tramp-methods’ can be overwritten manually. Set ‘tramp-connection-properties’ to manually override ‘tramp-methods’. Properties in this list are in the form ‘(REGEXP PROPERTY VALUE)’. REGEXP matches remote file names. Use ‘nil’ to match all. PROPERTY is the property’s name, and VALUE is the property’s value. PROPERTY is any method specific parameter contained in ‘tramp-methods’. The parameter key in ‘tramp-methods’ is a symbol name ‘tramp-’. To overwrite that property, use the string "" for PROPERTY. For example, this changes the remote shell: (add-to-list 'tramp-connection-properties (list (regexp-quote "/ssh:user@randomhost.your.domain:") "remote-shell" "/bin/ksh")) (add-to-list 'tramp-connection-properties (list (regexp-quote "/ssh:user@randomhost.your.domain:") "remote-shell-login" '("-"))) The parameters ‘tramp-remote-shell’ and ‘tramp-remote-shell-login’ in ‘tramp-methods’ now have new values for the remote host. PROPERTY could also be any property found in ‘tramp-persistency-file-name’. 4.15.1 Relevant connection properties to override ------------------------------------------------- Not all connection properties need to be changed. The most relevant properties are listed here: • "login-program" The property "login-program" stores the program to be used to connect to the remote host. Sometimes, the program might have another name on your host, or it might be located in another path. In this case, you can overwrite the default value, which is special for every connection method. It is used in all connection methods of ‘tramp-sh.el’. • "login-args" "login-args" specifies a list of lists of arguments to pass to "login-program". Read the docstring of ‘tramp-methods’ how to construct these lists. • "remote-shell" This property tells Tramp which remote shell to apply on the remote host. It is used in all connection methods of ‘tramp-sh.el’. The default value is "/bin/sh". • "remote-shell-login" A property to be used in conjunction with "remote-shell". It specifies, which shell argument triggers a login shell. Its default value is "-l", but some shells, like ‘ksh’, prefer "-". • "session-timeout" All ‘tramp-sh.el’ based methods accept the property "session-timeout". This is the time (in seconds) after a connection is disabled for security reasons, and must be reestablished. A value of ‘nil’ disables this feature. Most of the methods do not set this property except the ‘sudo’ and ‘doas’ methods, which use predefined values. • "tmpdir" The temporary directory on the remote host. If not specified, the default value is "/data/local/tmp" for the ‘adb’ method, "/C$/Temp" for the ‘smb’ method, and "/tmp" otherwise. • "direct-async-process" When this property is non-‘nil’, an alternative, more performant implementation of ‘make-process’ and ‘start-file-process’ is applied. The connection method must also be marked with a non-‘nil’ ‘tramp-direct-async’ parameter in ‘tramp-methods’. *note Improving performance of asynchronous remote processes:: for a discussion of constraints. • "posix" Connections using the ‘smb’ method check, whether the remote host supports posix commands. If the remote host runs Samba, it confirms this capability. However, some very old Samba versions have errors in their implementation. In order to suppress the posix commands for those hosts, the property "posix" should be set to ‘nil’. The default value of this property is ‘t’ (not specified in ‘tramp-methods’). If the remote host runs native MS Windows, this property has no effect. • "mount-point" The directory file name an FUSE-based file system is mounted on. The default value of this property is "/tmp/tramp.method.user@host#port" (not specified in ‘tramp-methods’). • "mount-args" "copyto-args" "moveto-args" "about-args" These properties keep optional flags to the different ‘rclone’ operations. See their default values in ‘tramp-methods’ if you want to change their values.  File: tramp.info, Node: Remote programs, Next: Remote shell setup, Prev: Predefined connection information, Up: Configuration 4.16 How TRAMP finds and uses programs on the remote host ========================================================= TRAMP requires access to and rights to several commands on remote hosts: ‘ls’, ‘test’, ‘find’ and ‘cat’. Besides there are other required programs for *note Inline methods:: and *note External methods:: of connection. To improve performance and accuracy of remote file access, TRAMP uses ‘perl’ (or ‘perl5’) and ‘grep’ when available. -- User Option: tramp-remote-path ‘tramp-remote-path’ specifies which remote directory paths TRAMP can search for *note Remote programs::. TRAMP uses standard defaults, such as ‘/bin’ and ‘/usr/bin’, which are reasonable for most hosts. To accommodate differences in hosts and paths, for example, ‘/bin:/usr/bin’ on Debian GNU/Linux or ‘/usr/xpg4/bin:/usr/ccs/bin:/usr/bin:/opt/developerstudio12.6/bin’ on Solaris, TRAMP queries the remote host with ‘getconf PATH’ and updates the symbol ‘tramp-default-remote-path’. For instances where hosts keep obscure locations for paths for security reasons, manually add such paths to local ‘.emacs’ as shown below for TRAMP to use when connecting. (add-to-list 'tramp-remote-path "/usr/local/perl/bin") Another way to find the remote path is to use the path assigned to the remote user by the remote host. TRAMP does not normally retain this remote path after login. However, ‘tramp-own-remote-path’ preserves the path value, which can be used to update ‘tramp-remote-path’. (add-to-list 'tramp-remote-path 'tramp-own-remote-path) *Note* that this works only if your remote ‘/bin/sh’ shell supports the login argument ‘-l’. Starting with Emacs 26, ‘tramp-remote-path’ can be set per host via connection-local variables, *Note (emacs)Connection Variables::. You could define your own search directories like this: (connection-local-set-profile-variables 'remote-path-with-bin '((tramp-remote-path . ("~/bin" tramp-default-remote-path)))) (connection-local-set-profile-variables 'remote-path-with-apply-pub-bin '((tramp-remote-path . ("/appli/pub/bin" tramp-default-remote-path)))) (connection-local-set-profiles '(:application tramp :machine "randomhost") 'remote-path-with-bin) (connection-local-set-profiles '(:application tramp :user "anotheruser" :machine "anotherhost") 'remote-path-with-apply-pub-bin) When remote search paths are changed, local TRAMP caches must be recomputed. To force TRAMP to recompute afresh, call ‘M-x tramp-cleanup-this-connection ’ or friends (*note Cleanup remote connections::).  File: tramp.info, Node: Remote shell setup, Next: FUSE setup, Prev: Remote programs, Up: Configuration 4.17 Remote shell setup hints ============================= 4.17.1 Changing the default remote or local shell ------------------------------------------------- By default, TRAMP uses the command ‘/bin/sh’ for starting a shell on the remote host. This can be changed by setting the connection property "remote-shell"; see *note Predefined connection information::. If you want, for example, use ‘/usr/bin/zsh’ on a remote host, you might apply (add-to-list 'tramp-connection-properties (list (regexp-quote "/sshx:user@host:") "remote-shell" "/usr/bin/zsh")) This works only for connection methods which allow to override the remote login shell, like ‘sshx’ or ‘plink’. See *note Inline methods:: and *note External methods:: for connection methods which support this. This approach has also the advantage, that settings in ‘tramp-sh-extra-args’ will be applied. For ‘zsh’, the trouble with the shell prompt due to set zle options will be avoided. For ‘bash’, loading ‘~/.editrc’ or ‘~/.inputrc’ is suppressed. Similar problems can happen with the local shell Tramp uses to create a process. By default, it uses the command ‘/bin/sh’ for this, which could also be a link to another shell. In order to overwrite this, you might apply (customize-set-variable 'tramp-encoding-shell "/usr/bin/zsh") This uses also the settings in ‘tramp-sh-extra-args’. *Note*: If you use an ‘ssh’-based method for connection, do _not_ set the ‘RemoteCommand’ option in your ‘ssh’ configuration, for example to ‘screen’. On the other hand, some ‘ssh’-based methods, like ‘sshx’ or ‘scpx’, silently overwrite a ‘RemoteCommand’ option of the configuration file. 4.17.2 Other remote shell setup hints ------------------------------------- TRAMP checks for the availability of standard programs in the usual locations. Common tactics include successively trying ‘test -e’, ‘/usr/bin/test -e’, and ‘/bin/test -e’. ‘ls -d’ is another approach. But these approaches do not help with these new login patterns. When TRAMP encounters two-factor logins or additional challenge questions, such as entering birth date or security code or passphrase, TRAMP needs a few more configuration steps to accommodate them. The difference between a password prompt and a passphrase prompt is that the password for completing the login while the passphrase is for authorizing access to local authentication information, such as the ssh key. There is no one configuration to accommodate all the variations in login security, especially not the exotic ones. However, TRAMP provides a few tweaks to address the most common ones. ‘tramp-shell-prompt-pattern’ ‘tramp-shell-prompt-pattern’ is for remote login shell prompt, which may not be the same as the local login shell prompt, ‘shell-prompt-pattern’. Since most hosts use identical prompts, TRAMP sets a similar default value for both prompts. ‘tramp-password-prompt-regexp’ ‘tramp-wrong-passwd-regexp’ TRAMP uses ‘tramp-password-prompt-regexp’ to distinguish between prompts for passwords and prompts for passphrases. By default, ‘tramp-password-prompt-regexp’ handles the detection in English language environments. See a localization example below: (customize-set-variable 'tramp-password-prompt-regexp (concat "^.*" (regexp-opt '("passphrase" "Passphrase" ;; English "password" "Password" ;; Deutsch "passwort" "Passwort" ;; Français "mot de passe" "Mot de passe") t) ".*:\0? *")) This user option is, by default, initialised from ‘password-word-equivalents’ when TRAMP is loaded, and it is usually more convenient to add new passphrases to that user option instead of altering this user option. Similar localization may be necessary for handling wrong password prompts, for which TRAMP uses ‘tramp-wrong-passwd-regexp’. ‘tramp-terminal-type’ TRAMP uses the user option ‘tramp-terminal-type’ to set the remote environment variable ‘TERM’ for the shells it runs. By default, it is "dumb", but this could be changed. A dumb terminal is best suited to run the background sessions of TRAMP. However, running interactive remote shells might require a different setting. This could be achieved by tweaking the ‘TERM’ environment variable in ‘process-environment’. (let ((process-environment (cons "TERM=xterm-256color" process-environment))) (shell)) Determining a TRAMP session Sometimes, it is needed to identify whether a shell runs under TRAMP control. The setting of environment variable ‘TERM’ will help: if test "$TERM" = "dumb"; then ... fi Another possibility is to check the environment variable ‘INSIDE_EMACS’. Like for all subprocesses of Emacs, this is set to the version of the parent Emacs process, *Note (emacs)Interactive Shell::. TRAMP adds its own package version to this string, which could be used for further tests in an inferior shell. The string of that environment variable looks always like echo $INSIDE_EMACS ⇒ 27.2,tramp:2.4.5 ‘tset’ and other questions To suppress inappropriate prompts for terminal type, TRAMP sets the ‘TERM’ environment variable before the remote login process begins via the user option ‘tramp-terminal-type’ (see above). This will silence common ‘tset’ related prompts. TRAMP’s strategy for handling such prompts (commonly triggered from login scripts on remote hosts) is to set the environment variables so that no prompts interrupt the shell initialization process. An alternative approach is to configure TRAMP with strings that can identify such questions using ‘tramp-actions-before-shell’. Example: (defconst my-tramp-prompt-regexp "Enter the birth date of your mother:\\s-*" "Regular expression matching my login prompt question.") (defun my-tramp-action (proc vec) "Enter \"19000101\" in order to give a correct answer." (save-window-excursion (with-current-buffer (tramp-get-connection-buffer vec) (tramp-message vec 6 "\n%s" (buffer-string)) (tramp-send-string vec "19000101")))) (add-to-list 'tramp-actions-before-shell '(my-tramp-prompt-regexp my-tramp-action)) The regular expressions used in ‘tramp-actions-before-shell’ must match the end of the connection buffer. Due to performance reasons, this search starts at the end of the buffer, and it is limited to 256 characters backwards. Conflicting names for users and variables in ‘.profile’ When a user name is the same as a variable name in a local file, such as ‘.profile’, then TRAMP may send incorrect values for environment variables. To avoid incorrect values, change the local variable name to something different from the user name. For example, if the user name is ‘FRUMPLE’, then change the variable name to ‘FRUMPLE_DIR’. Non-Bourne commands in ‘.profile’ When the remote host’s ‘.profile’ is also used for shells other than Bourne shell, then some incompatible syntaxes for commands in ‘.profile’ may trigger errors in Bourne shell on the host and may not complete client’s TRAMP connections. One example of a Bourne shell incompatible syntax in ‘.profile’: using ‘export FOO=bar’ instead of ‘FOO=bar; export FOO’. After remote login, TRAMP will trigger an error during its execution of ‘/bin/sh’ on the remote host because Bourne shell does not recognize the export command as entered in ‘.profile’. Likewise, (‘~’) character in paths will cause errors because Bourne shell does not do (‘~’) character expansions. One approach to avoiding these incompatibilities is to make all commands in ‘~/.shrc’ and ‘~/.profile’ Bourne shell compatible so TRAMP can complete connections to that remote. To accommodate using non-Bourne shells on that remote, use other shell-specific config files. For example, bash can use ‘~/.bash_profile’ and ignore ‘.profile’. Interactive shell prompt TRAMP redefines the remote shell prompt internally for robust parsing. This redefinition affects the looks of a prompt in an interactive remote shell through commands, such as ‘M-x shell ’. Such prompts, however, can be reset to something more readable and recognizable using these environment variables. TRAMP sets the ‘INSIDE_EMACS’ environment variable in the startup script file ‘~/.emacs_SHELLNAME’. ‘SHELLNAME’ is ‘bash’ or equivalent shell names. Change it by setting the environment variable ‘ESHELL’ in the ‘.emacs’ as follows: (setenv "ESHELL" "bash") Then re-set the prompt string in ‘~/.emacs_SHELLNAME’ as follows: # Reset the prompt for remote TRAMP shells. if [ "${INSIDE_EMACS/*tramp*/tramp}" == "tramp" ] ; then PS1="[\u@\h \w]$ " fi *Note (emacs)Interactive Shell::. ‘busybox’ / ‘nc’ TRAMP’s ‘nc’ method uses the ‘nc’ command to install and execute a listener as follows (see ‘tramp-methods’): $ nc -l -p 42 The above command-line syntax has changed with ‘busybox’ versions. If ‘nc’ refuses the ‘-p’ parameter, then overwrite as follows: (add-to-list 'tramp-connection-properties `(,(regexp-quote "192.168.0.1") "remote-copy-args" (("-l") ("%r")))) where ‘192.168.0.1’ is the remote host IP address (*note Predefined connection information::).  File: tramp.info, Node: FUSE setup, Next: Android shell setup, Prev: Remote shell setup, Up: Configuration 4.18 FUSE setup hints ===================== The FUSE file systems are mounted per default at ‘/tmp/tramp.method.user@host#port’. The user name and port number are optional. If the file system is already mounted, it will be used as it is. If the mount point does not exist yet, TRAMP creates this directory. The mount point can be overwritten by the connection property "mount-point", *note Predefined connection information::. Example: (add-to-list 'tramp-connection-properties `(,(regexp-quote "/sshfs:user@host:") "mount-point" ,(expand-file-name "sshfs.user@host" user-emacs-directory))) 4.18.1 ‘rclone’ setup --------------------- The default arguments of the ‘rclone’ operations ‘mount’, ‘coopyto’, ‘moveto’ and ‘about’ are declared in the variable ‘tramp-methods’ as method specific parameters. Usually, they don’t need to be overwritten. If needed, these parameters can be overwritten as connection properties "mount-args", "copyto-args", "moveto-args" and "about-args", *Note Predefined connection information::. All of them are list of strings. Be careful changing "--dir-cache-time", this could delay visibility of files. 4.18.2 ‘sshfs’ setup -------------------- The method ‘sshfs’ declares the mount arguments in the variable ‘tramp-methods’, passed to the ‘sshfs’ command. This is a list of list of strings, and can be overwritten by the connection property "mount-args", *Note Predefined connection information::. Additionally, it declares also the arguments for running remote processes, using the ‘ssh’ command. These don’t need to be changed.  File: tramp.info, Node: Android shell setup, Next: Auto-save and Backup, Prev: FUSE setup, Up: Configuration 4.19 Android shell setup hints ============================== TRAMP uses the ‘adb’ method to access Android devices. Android devices provide a restricted shell access through an USB connection. The local host must have the ‘adb’ program installed. Usually, it is sufficient to open the file ‘/adb::/’. Then you can navigate in the file system via ‘dired’. Alternatively, applications such as ‘Termux’ or ‘SSHDroid’ that run ‘sshd’ process on the Android device can accept any ‘ssh’-based methods provided these settings are adjusted: • ‘sh’ must be specified for remote shell since Android devices do not provide ‘/bin/sh’. ‘sh’ will then invoke whatever shell is installed on the device with this setting: (add-to-list 'tramp-connection-properties (list (regexp-quote "192.168.0.26") "remote-shell" "sh")) where ‘192.168.0.26’ is the Android device’s IP address. (*note Predefined connection information::). • TRAMP requires preserving ‘PATH’ environment variable from user settings. Android devices prefer ‘/system/xbin’ path over ‘/system/bin’. Both of these are set as follows: (add-to-list 'tramp-remote-path 'tramp-own-remote-path) (add-to-list 'tramp-remote-path "/system/xbin") • When the Android device is not ‘rooted’, specify a writable directory for temporary files: (add-to-list 'tramp-remote-process-environment "TMPDIR=$HOME") • Open a remote connection with the command ‘C-x C-f /ssh:192.168.0.26#2222: ’, where ‘sshd’ is listening on port ‘2222’. To add a corresponding entry to the ‘~/.ssh/config’ file (recommended), use this: Host android HostName 192.168.0.26 User root Port 2222 To use the host name ‘android’ instead of the IP address shown in the previous example, fix the connection properties as follows: (add-to-list 'tramp-connection-properties (list (regexp-quote "android") "remote-shell" "sh")) Open a remote connection with a more concise command ‘C-x C-f /ssh:android: ’.  File: tramp.info, Node: Auto-save and Backup, Next: Keeping files encrypted, Prev: Android shell setup, Up: Configuration 4.20 Auto-save and Backup configuration ======================================= To avoid TRAMP from saving backup files owned by ‘root’ to locations accessible to others, default backup settings in ‘backup-directory-alist’ have to be altered. Here’s a scenario where files could be inadvertently exposed. Emacs by default writes backup files to the same directory as the original files unless changed to another location, such as ‘~/.emacs.d/backups/’. Such a directory will also be used by default by TRAMP when using, say, a restricted file ‘/su:root@localhost:/etc/secretfile’. The backup file of the secretfile is now owned by the user logged in from TRAMP and not ‘root’. When ‘backup-directory-alist’ is ‘nil’ (the default), such problems do not occur. To “turn off” the backup feature for remote files and stop TRAMP from saving to the backup directory, use this: (add-to-list 'backup-directory-alist (cons tramp-file-name-regexp nil)) Disabling backups can be targeted to just the ‘su’ and ‘sudo’ methods: (setq backup-enable-predicate (lambda (name) (and (normal-backup-enable-predicate name) (not (let ((method (file-remote-p name 'method))) (when (stringp method) (member method '("su" "sudo")))))))) Another option is to create better backup file naming with user and host names prefixed to the file name. For example, transforming ‘/etc/secretfile’ to ‘~/.emacs.d/backups/!su:root@localhost:!etc!secretfile’, set the TRAMP user option ‘tramp-backup-directory-alist’ from the existing user option ‘backup-directory-alist’. Then TRAMP backs up to a file name that is transformed with a prefix consisting of the DIRECTORY name. This file name prefixing happens only when the DIRECTORY is an absolute local file name. Example: (add-to-list 'backup-directory-alist (cons "." "~/.emacs.d/backups/")) (customize-set-variable 'tramp-backup-directory-alist backup-directory-alist) The backup file name of ‘/su:root@localhost:/etc/secretfile’ would be ‘/su:root@localhost:~/.emacs.d/backups/!su:root@localhost:!etc!secretfile~’ Just as for backup files, similar issues of file naming affect auto-saving remote files. Auto-saved files are saved in the directory specified by the user option ‘auto-save-file-name-transforms’. By default this is set to the local temporary directory. But in some versions of Debian GNU/Linux, this points to the source directory where the Emacs was compiled. Reset such values to a valid directory. Set ‘auto-save-file-name-transforms’ to ‘nil’ to save auto-saved files to the same directory as the original file. Alternatively, set the user option ‘tramp-auto-save-directory’ to direct all auto saves to that location. Per default, TRAMP asks for confirmation if a ‘root’-owned backup or auto-save remote file has to be written to your local temporary directory. If you want to suppress this confirmation question, set user option ‘tramp-allow-unsafe-temporary-files’ to ‘t’.  File: tramp.info, Node: Keeping files encrypted, Next: Windows setup hints, Prev: Auto-save and Backup, Up: Configuration 4.21 Protect remote files by encryption ======================================= *Note*: File encryption in TRAMP is experimental, don’t use it in production systems! Sometimes, it is desirable to protect files located on remote directories, like cloud storages. In order to do this, you might instruct TRAMP to encrypt all files copied to a given remote directory, and to decrypt such files when accessing. This includes both file contents and file names. TRAMP does this transparently. Although both files and file names are encrypted on the remote side, they are accessible inside Emacs as they wouldn’t be transformed as such. Internally, TRAMP uses the ‘encfs’ package. Therefore, this feature is available only if this package is installed on the local host. TRAMP does not keep and ‘encfs mountpoint’ permanently. Instead, it encrypts / decrypts files and file names on the fly, using ‘encfsctl’. -- Command: tramp-crypt-add-directory name This command marks the existing remote directory NAME for encryption. Files in that directory and all subdirectories will be encrypted before copying to, and decrypted after copying from that directory. File and directory names will be also encrypted. -- User Option: tramp-crypt-encfs-option If a remote directory is marked for encryption, it is initialized via ‘encfs’ the very first time a file in this directory is accessed. This user option controls, which default ‘encfs’ configuration option will be selected, it can be "--standard" or "--paranoia". See the ‘encfs(1)’ man page for details. However, TRAMP must adapt these configuration sets. The ‘chainedNameIV’ configuration option must be disabled; otherwise TRAMP couldn’t handle file name encryption transparently. A password protected ‘encfs’ configuration file is created the very first time you access an encrypted remote directory. It is kept in your ‘user-emacs-directory’ with the url-encoded directory name as part of the basename, and ‘encfs6.xml’ as suffix. If you, for example, mark the remote directory ‘/nextcloud:user@host:/path/to/dir’ for encryption, the configuration file is saved as ‘tramp-%2Fnextcloud%3Auser%40host%3A%2Fpath%2Fto%2Fdir%2F.encfs6.xml’ in ‘user-emacs-directory’. Do not loose this file and the corresponding password; otherwise there is no way to decrypt your encrypted files. -- User Option: tramp-crypt-save-encfs-config-remote If this user option is non-‘nil’ (the default), the ‘encfs’ configuration file ‘.encfs6.xml’ is also kept in the encrypted remote directory. It depends on you, whether you regard the password protection of this file as sufficient. The advantage would be, that such a remote directory could be accessed by different Emacs sessions, different users, without presharing the configuration file between the users. The command ‘encfsctl’, the workhorse for encryption / decryption, needs the configuration file password every call. Therefore, it is recommend to cache this password in Emacs. This can be done using ‘auth-sources’, *note Using an authentication file::. An entry needs the url-encoded directory name as machine, your local user name as user, and the password. The port is optional, if given it must be the string "crypt". The example above would require the following entry in the authentication file ("yourname" is the result of ‘(user-login-name)’): machine %2Fnextcloud%3Auser%40host%3A%2Fpath%2Fto%2Fdir%2F \ login yourname port crypt password geheim If you use a remote file name with a quoted localname part, this localname and the corresponding file will not be encrypted / decrypted. If you have an encrypted remote directory ‘/nextcloud:user@host:/path/to/dir’, the command C-x d /nextcloud:user@host:/path/to/dir will show the directory listing with the plain file names, and the command C-x d /nextcloud:user@host:/:/path/to/dir will show the directory listing with the encrypted file names, and visiting a file will show its encrypted contents. However, it is highly discouraged to mix encrypted and not encrypted files in the same directory. -- Command: tramp-crypt-remove-directory name This command should be used to indicate that files in ‘name’ should no longer be encrypted. Existing encrypted files and subdirectories will remain encrypted.  File: tramp.info, Node: Windows setup hints, Prev: Keeping files encrypted, Up: Configuration 4.22 Issues with Cygwin ssh =========================== This section is incomplete. Please share your solutions. Cygwin’s ‘ssh’ works only with a Cygwin version of Emacs. To check for compatibility: type ‘M-x eshell ’, and start ‘ssh test.host ’. Incompatibilities trigger this message: Pseudo-terminal will not be allocated because stdin is not a terminal. Some older versions of Cygwin’s ‘ssh’ work with the ‘sshx’ access method. Consult Cygwin’s FAQ at for details. On the Emacs Wiki (https://www.emacswiki.org/emacs/SshWithNTEmacs) it is explained how to use the helper program ‘fakecygpty’ to fix this problem. When using the ‘scpx’ access method, Emacs may call ‘scp’ with MS Windows file naming, such as ‘c:/foo’. But the version of ‘scp’ that is installed with Cygwin does not know about MS Windows file naming, which causes it to incorrectly look for a host named ‘c’. A workaround: write a wrapper script for ‘scp’ to convert Windows file names to Cygwin file names. When using the ‘ssh-agent’ on MS Windows for password-less interaction, ‘ssh’ methods depend on the environment variable ‘SSH_AUTH_SOCK’. But this variable is not set when Emacs is started from a Desktop shortcut and authentication fails. One workaround is to use an MS Windows based SSH Agent, such as Pageant. It is part of the Putty Suite of tools. The fallback is to start Emacs from a shell.  File: tramp.info, Node: Usage, Next: Bug Reports, Prev: Configuration, Up: Top 5 Using TRAMP ************* TRAMP operates transparently, accessing remote files as if they are local. However, TRAMP employs a formalized remote file naming syntax to perform its functions transparently. This syntax consists of many parts specifying access methods, authentication, host names, and file names. Ange FTP uses a similar syntax. Unlike opening local files in Emacs, which are instantaneous, opening remote files in TRAMP is slower at first. Sometimes there is a noticeable delay before the prompts for passwords or authentication appear in the minibuffer. Hitting ‘’ or other keys during this gap will be processed by Emacs. This type-ahead facility is a feature of Emacs that may cause missed prompts when using TRAMP. * Menu: * File name syntax:: TRAMP file name conventions. * Change file name syntax:: Alternative file name syntax. * File name completion:: File name completion. * Ad-hoc multi-hops:: Declaring multiple hops in the file name. * Remote processes:: Integration with other Emacs packages. * Cleanup remote connections:: Cleanup remote connections. * Renaming remote files:: Renaming remote files. * Archive file names:: Access to files in file archives.  File: tramp.info, Node: File name syntax, Next: Change file name syntax, Up: Usage 5.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 ‘~’ 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 ‘#’ 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, *Note Default Method::, *Note Default User::, *Note Default Host::. For syntactical reasons, the default method must be indicated by the pseudo method ‘-’.  File: tramp.info, Node: Change file name syntax, Next: File name completion, Prev: File name syntax, Up: Usage 5.2 Alternative file name syntax ================================ The syntax described in *note File name syntax:: is the ‘default’ syntax, which is active after Emacs startup. However, this can be changed. -- Command: tramp-change-syntax syntax This command changes the syntax TRAMP uses for remote file names. Beside the ‘default’ value, SYNTAX can be • ‘simplified’ The remote file name syntax is similar to the syntax used by Ange FTP. A remote file name has the form ‘/user@host:path/to/file’. The ‘user@’ part is optional, and the method is determined by *note Default Method::. • ‘separate’ The remote file name syntax is similar to the syntax used by XEmacs. A remote file name has the form ‘/[method/user@host]path/to/file’. The ‘method’ and ‘user@’ parts are optional. -- Variable: tramp-file-name-regexp This variable keeps a regexp which matches the selected remote file name syntax. Its value changes after every call of ‘tramp-change-syntax’. However, it is not recommended to use this variable in external packages, a call of ‘file-remote-p’ is much more appropriate. *note (elisp)Magic File Names::.  File: tramp.info, Node: File name completion, Next: Ad-hoc multi-hops, Prev: Change file name syntax, Up: Usage 5.3 File name completion ======================== TRAMP can complete the following TRAMP file name components: method names, user names, host names, and file names located on remote hosts. User name and host name completion is activated only, if file name completion has one of the styles ‘basic’, ‘emacs21’, or ‘emacs22’. *Note (emacs)Completion Styles::. For example, type ‘C-x C-f / s ’, TRAMP completion choices show up as sbin/ scp: scpx: sftp: sg: smb: srv/ ssh: sshx: su: sudo: sys/ ‘ssh:’ is a possible completion for the respective method, and ‘sbin/’ stands for the directory ‘/sbin’ on your local host. Type ‘s h :’ for the minibuffer completion to ‘/ssh:’. Typing ‘’ shows host names TRAMP extracts from ‘~/.ssh/config’ file, for example. ssh:127.0.0.1: ssh:192.168.0.1: ssh:[::1]: ssh:localhost: ssh:melancholia.danann.net: ssh:melancholia: Choose a host from the above list and then continue to complete file names on that host. When the configuration (*note Customizing Completion::) includes user names, then the completion lists will account for the user names as well. Results from ‘auth-sources’ search (*note Using an authentication file::) are added to the completion candidates. This search could be annoying, for example due to a passphrase request of the ‘~/.authinfo.gpg’ authentication file. The user option ‘tramp-completion-use-auth-sources’ controls, whether such a search is performed during completion. Remote hosts previously visited or hosts whose connections are kept persistently (*note Connection caching::) will be included in the completion lists. After remote host name completion comes completion of file names on the remote host. It works the same as with local host file completion except that killing with double-slash ‘//’ kills only the file name part of the TRAMP file name syntax. A triple-slash stands for the default behavior. *Note (emacs)Minibuffer File::. Example: C-x C-f /ssh:melancholia:/usr/local/bin//etc ⊣ /ssh:melancholia:/etc C-x C-f /ssh:melancholia://etc ⊣ /ssh:melancholia:/etc C-x C-f /ssh:melancholia:/usr/local/bin///etc ⊣ /etc  File: tramp.info, Node: Ad-hoc multi-hops, Next: Remote processes, Prev: File name completion, Up: Usage 5.4 Declaring multiple hops in the file name ============================================ TRAMP file name syntax can accommodate ad-hoc specification of multiple proxies without using ‘tramp-default-proxies-alist’ configuration setup (*note Multi-hops::). Each proxy is specified using the same syntax as the remote host specification minus the file name part. Each hop is separated by a ‘|’. Chain the proxies from the starting host to the destination remote host name and file name. For example, hopping over a single proxy ‘bird@bastion’ to a remote file on ‘you@remotehost’: C-x C-f /ssh:bird@bastion|ssh:you@remotehost:/path Each involved method must be an inline method (*note Inline methods::). TRAMP adds the ad-hoc definitions on the fly to ‘tramp-default-proxies-alist’ and is available for re-use during that Emacs session. Subsequent TRAMP connections to the same remote host can then use the shortcut form: ‘/ssh:you@remotehost:/path’. Ad-hoc definitions are removed from ‘tramp-default-proxies-alist’ via the command ‘M-x tramp-cleanup-all-connections ’ (*note Cleanup remote connections::). -- User Option: tramp-save-ad-hoc-proxies For ad-hoc definitions to be saved automatically in ‘tramp-default-proxies-alist’ for future Emacs sessions, set ‘tramp-save-ad-hoc-proxies’ to non-‘nil’. (customize-set-variable 'tramp-save-ad-hoc-proxies t) Ad-hoc proxies can take patterns ‘%h’ or ‘%u’ like in ‘tramp-default-proxies-alist’. The following file name expands to user ‘root’ on host ‘remotehost’, starting with an ‘ssh’ session on host ‘remotehost’: ‘/ssh:%h|su:remotehost:’. On the other hand, if a trailing hop does not specify a host name, the host name of the previous hop is reused. Therefore, the following file name is equivalent to the previous example: ‘/ssh:remotehost|su::’.  File: tramp.info, Node: Remote processes, Next: Cleanup remote connections, Prev: Ad-hoc multi-hops, Up: Usage 5.5 Integration with other Emacs packages ========================================= TRAMP supports starting new running processes on the remote host for discovering remote file names. Emacs packages on the remote host need no specific modifications for TRAMP’s use. This type of integration does not work with the ‘ftp’ method, and does not support the pty association as specified in ‘start-file-process’. ‘process-file’ and ‘start-file-process’ work on the remote host when the variable ‘default-directory’ is remote: (let ((default-directory "/ssh:remote.host:")) (start-file-process "grep" (get-buffer-create "*grep*") "/bin/sh" "-c" "grep -e tramp *")) For a local process, ‘process-file’ returns either the exit code of the process, or a string describing a signal, when the process has been interrupted. Since it cannot be determined reliably whether a remote process has been interrupted, ‘process-file’ will always returns the exit code for it. When the user option ‘process-file-return-signal-string’ is non-‘nil’, ‘process-file’ treats all exit codes greater than 128 as an indication that the process has been interrupted, and returns a corresponding string. This remote process handling does not apply to GVFS (see *note GVFS-based methods::) because the remote file system is mounted on the local host and TRAMP accesses it by changing the ‘default-directory’. TRAMP starts a remote process when a command is executed in a remote file or directory buffer. As of now, these packages have been integrated to work with TRAMP: ‘shell.el’, ‘eshell.el’, ‘compile.el’ (commands like ‘compile’ and ‘grep’) and ‘gud.el’ (‘gdb’ or ‘perldb’). TRAMP always modifies the ‘INSIDE_EMACS’ environment variable for remote processes. By default, this environment variable shows the Emacs version. TRAMP adds its own version string, so it looks like ‘27.2,tramp:2.4.5.1’. However, other packages might also add their name to this environment variable, like ‘27.2,comint,tramp:2.4.5.1’. For TRAMP to find the command on the remote, it must be accessible through the default search path as setup by TRAMP upon first connection. Alternatively, use an absolute path or extend ‘tramp-remote-path’ (see *note Remote programs::): (add-to-list 'tramp-remote-path "~/bin") (add-to-list 'tramp-remote-path "/appli/pub/bin") Customize user option ‘tramp-remote-process-environment’ to suit the remote program’s environment for the remote host. ‘tramp-remote-process-environment’ is a list of strings structured similar to ‘process-environment’, where each element is a string of the form ‘ENVVARNAME=VALUE’. To avoid any conflicts with local host environment variables set through local configuration files, such as ‘~/.profile’, use ‘ENVVARNAME=’ to unset them for the remote environment. Use ‘add-to-list’ to add entries: (add-to-list 'tramp-remote-process-environment "JAVA_HOME=/opt/java") Modifying or deleting already existing values in the ‘tramp-remote-process-environment’ list may not be feasible on restricted remote hosts. For example, some system administrators disallow changing ‘HISTORY’ environment variable. To accommodate such restrictions when using TRAMP, fix the ‘tramp-remote-process-environment’ by the following code in the local ‘.emacs’ file: (let ((process-environment tramp-remote-process-environment)) (setenv "HISTORY" nil) (setq tramp-remote-process-environment process-environment)) Setting the ‘ENV’ environment variable instructs some shells to read an initialization file. By default, TRAMP disables this. You can override this behavior by evaluating (let ((process-environment tramp-remote-process-environment)) (setenv "ENV" "$HOME/.profile") (setq tramp-remote-process-environment process-environment)) In addition to ‘tramp-remote-process-environment’, you can set environment variables for individual remote process calls by let-binding ‘process-environment’. TRAMP applies any entries not present in the global default value of ‘process-environment’ (overriding ‘tramp-remote-process-environment’ settings, if they conflict). For example: (let ((process-environment (cons "HGPLAIN=1" process-environment))) (process-file ...)) Let-binding in this way works regardless of whether the process to be called is local or remote, since TRAMP would add just the ‘HGPLAIN’ setting and local processes would take whole value of ‘process-environment’ along with the new value of ‘HGPLAIN’. For integrating other Emacs packages so TRAMP can execute remotely, please file a bug report. *Note Bug Reports::. 5.5.1 Running remote programs that create local X11 windows ----------------------------------------------------------- To allow a remote program to create an X11 window on the local host, set the ‘DISPLAY’ environment variable for the remote host as follows in the local ‘.emacs’ file: (add-to-list 'tramp-remote-process-environment (format "DISPLAY=%s" (getenv "DISPLAY"))) ‘(getenv "DISPLAY")’ should return a recognizable name for the local host that the remote host can redirect X11 window interactions. If querying for a recognizable name is not possible for whatever reason, then replace ‘(getenv "DISPLAY")’ with a hard-coded, fixed name. Note that using ‘:0’ for X11 display name here will not work as expected. An alternate approach is specify ‘ForwardX11 yes’ or ‘ForwardX11Trusted yes’ in ‘~/.ssh/config’ on the local host. 5.5.2 Running ‘shell’ on a remote host -------------------------------------- Set ‘explicit-shell-file-name’ to the appropriate shell name when using TRAMP between two hosts with different operating systems, such as ‘windows-nt’ and ‘gnu/linux’. This option ensures the correct name of the remote shell program. When ‘explicit-shell-file-name’ is equal to ‘nil’, calling ‘shell’ interactively will prompt for a shell name. Starting with Emacs 26, you could use connection-local variables for setting different values of ‘explicit-shell-file-name’ for different remote hosts. *Note (emacs)Connection Variables::. (connection-local-set-profile-variables 'remote-bash '((explicit-shell-file-name . "/bin/bash") (explicit-bash-args . ("-i")))) (connection-local-set-profile-variables 'remote-ksh '((explicit-shell-file-name . "/bin/ksh") (explicit-ksh-args . ("-i")))) (connection-local-set-profiles '(:application tramp :protocol "ssh" :machine "localhost") 'remote-bash) (connection-local-set-profiles `(:application tramp :protocol "sudo" :user "root" :machine ,(system-name)) 'remote-ksh) 5.5.3 Running ‘shell-command’ on a remote host ---------------------------------------------- ‘shell-command’ executes commands synchronously or asynchronously on remote hosts and displays output in buffers on the local host. Example: C-x C-f /sudo:: M-& tail -f /var/log/syslog.log ‘tail’ command outputs continuously to the local buffer whose name is the value of the variable ‘shell-command-buffer-name-async’. ‘M-x auto-revert-tail-mode ’ runs similarly showing continuous output. ‘shell-command’ uses the user option ‘shell-file-name’ and the variable ‘shell-command-switch’ in order to determine which shell to run. For remote hosts, their default values are ‘/bin/sh’ and ‘-c’, respectively (except for the ‘adb’ method, which uses ‘/system/bin/sh’). Like the variables in the previous section, these variables can be changed via connection-local variables. If Emacs supports the user option ‘async-shell-command-width’ (since Emacs 27), TRAMP cares about its value for asynchronous shell commands. It specifies the number of display columns for command output. For synchronous shell commands, a similar effect can be achieved by adding the environment variable ‘COLUMNS’ to ‘tramp-remote-process-environment’. 5.5.4 Running ‘eshell’ on a remote host --------------------------------------- TRAMP is integrated into ‘eshell.el’, which enables interactive eshell sessions on remote hosts at the command prompt. You must add the module ‘eshell-tramp’ to ‘eshell-modules-list’. Here’s a sample interaction after opening ‘M-x eshell ’ on a remote host: ~ $ cd /sudo::/etc /sudo:root@host:/etc $ hostname host /sudo:root@host:/etc $ id uid=0(root) gid=0(root) groups=0(root) /sudo:root@host:/etc $ find-file shadow # /sudo:root@host:/etc $ ‘eshell’ added custom ‘su’ and ‘sudo’ commands that set the default directory correctly for the ‘*eshell*’ buffer. TRAMP silently updates ‘tramp-default-proxies-alist’ with an entry for this directory (*note Multi-hops::): ~ $ cd /ssh:user@remotehost:/etc /ssh:user@remotehost:/etc $ find-file shadow File is not readable: /ssh:user@remotehost:/etc/shadow /ssh:user@remotehost:/etc $ sudo find-file shadow # /ssh:user@remotehost:/etc $ su - /su:root@remotehost:/root $ id uid=0(root) gid=0(root) groups=0(root) /su:root@remotehost:/root $ 5.5.5 Running a debugger on a remote host ----------------------------------------- ‘gud.el’ provides a unified interface to symbolic debuggers (*note (emacs)Debuggers::). TRAMP can run debug on remote hosts by calling ‘gdb’ with a remote file name: M-x gdb Run gdb (like this): gdb -i=mi /ssh:host:~/myprog Since the remote ‘gdb’ and ‘gdb-inferior’ processes do not belong to the same process group on the remote host, there will be a warning, which can be ignored: &"warning: GDB: Failed to set controlling terminal: Operation not permitted\n" As consequence, there will be restrictions in I/O of the process to be debugged. Relative file names are based on the remote default directory. When ‘myprog.pl’ exists in ‘/ssh:host:/home/user’, valid calls include: M-x perldb Run perldb (like this): perl -d myprog.pl Just the local part of a remote file name, such as ‘perl -d /home/user/myprog.pl’, is not possible. Arguments of the program to be debugged must be literal, can take relative or absolute paths, but not remote paths. 5.5.6 Running remote processes on MS Windows hosts -------------------------------------------------- ‘winexe’ runs processes on a remote MS Windows host, and TRAMP can use it for ‘process-file’ and ‘start-file-process’. ‘tramp-smb-winexe-program’ specifies the local ‘winexe’ command. Powershell V2.0 on the remote host is required to run processes triggered from TRAMP. ‘explicit-shell-file-name’ and ‘explicit-*-args’ have to be set properly so ‘M-x shell ’ can open a proper remote shell on a MS Windows host. To open ‘cmd’, set it as follows: (setq explicit-shell-file-name "cmd" explicit-cmd-args '("/q")) To open ‘powershell’ as a remote shell, use this: (setq explicit-shell-file-name "powershell" explicit-powershell-args '("-file" "-")) 5.5.7 Improving performance of asynchronous remote processes ------------------------------------------------------------ TRAMP’s implementation of ‘make-process’ and ‘start-file-process’ requires a serious overhead for initialization, every process invocation. This is needed for handling interactive dialogues when connecting the remote host (like providing a password), and initial environment setup. Sometimes, this is not needed. Instead of starting a remote shell and running the command afterwards, it is sufficient to run the command directly. TRAMP supports this by an alternative implementation of ‘make-process’ and ‘start-file-process’. This is triggered by the connection property "direct-async-process", *Note Predefined connection information::, which must be set to a non-‘nil’ value. Example: (add-to-list 'tramp-connection-properties (list (regexp-quote "/ssh:user@host:") "direct-async-process" t)) Using direct asynchronous processes in TRAMP is not possible, if the remote host is connected via multiple hops (*note Multi-hops::). In this case, TRAMP falls back to its classical implementation. Furthermore, this approach has the following limitations: • It works only for connection methods defined in ‘tramp-sh.el’ and ‘tramp-adb.el’. • It does not support interactive user authentication. With ‘ssh’-based methods, this can be avoided by using a password agent like ‘ssh-agent’, using public key authentication, or using ‘ControlMaster’ options. • It cannot be applied for ‘ssh’-based methods, which use the ‘RemoteCommand’ option. • It cannot be killed via ‘interrupt-process’. • It does not report the remote terminal name via ‘process-tty-name’. • It does not set process property ‘remote-pid’. • It does not use ‘tramp-remote-path’. In order to gain even more performance, it is recommended to bind ‘tramp-verbose’ to 0 when running ‘make-process’ or ‘start-file-process’. Furthermore, you might set ‘tramp-use-ssh-controlmaster-options’ to ‘nil’ in order to bypass TRAMP’s handling of the ‘ControlMaster’ options, and use your own settings in ‘~/.ssh/config’.  File: tramp.info, Node: Cleanup remote connections, Next: Renaming remote files, Prev: Remote processes, Up: Usage 5.6 Cleanup remote connections ============================== TRAMP provides several ways to flush remote connections. -- Command: tramp-cleanup-connection vec &optional keep-debug keep-password This command flushes all connection related objects. VEC is the internal representation of a remote connection. When called interactively, this command lists active remote connections in the minibuffer. Each connection is of the format ‘/method:user@host:’. Flushing remote connections also cleans the password cache (*note Password handling::), file cache, connection cache (*note Connection caching::), and recentf cache (*note (emacs)File Conveniences::). It also deletes session timers (*note Predefined connection information::) and connection buffers. If KEEP-DEBUG is non-‘nil’, the debug buffer is kept. A non-‘nil’ KEEP-PASSWORD preserves the password cache. -- Command: tramp-cleanup-this-connection Flushes the current buffer’s remote connection objects, the same as in ‘tramp-cleanup-connection’. -- Command: tramp-cleanup-all-connections Flushes all active remote connection objects, the same as in ‘tramp-cleanup-connection’. This command removes also ad-hoc proxy definitions (*note Ad-hoc multi-hops::). -- Command: tramp-cleanup-all-buffers Just as for ‘tramp-cleanup-all-connections’, all remote connections and ad-hoc proxy definition are cleaned up in addition to killing all buffers related to remote connections.  File: tramp.info, Node: Renaming remote files, Next: Archive file names, Prev: Cleanup remote connections, Up: Usage 5.7 Renaming remote files ========================= Sometimes, it is desirable to safe file contents of buffers visiting a given remote host. This could happen for example, if the local host changes its network integration, and the remote host is not reachable anymore. -- Command: tramp-rename-files source target Replace in all buffers the visiting file name from SOURCE to TARGET. SOURCE is a remote directory name, which could contain also a localname part. TARGET is the directory name SOURCE is replaced with. Often, TARGET is a remote directory name on another host, but it can also be a local directory name. If TARGET has no local part, the local part from SOURCE is used. If TARGET is ‘nil’, it is selected according to the first match in ‘tramp-default-rename-alist’. If called interactively, this match is offered as initial value for selection. On all buffers, which have a ‘buffer-file-name’ matching SOURCE, this name is modified by replacing SOURCE with TARGET. This is applied by calling ‘set-visited-file-name’. The new ‘buffer-file-name’ is prompted for modification in the minibuffer. The buffers are marked modified, and must be saved explicitly. If user option ‘tramp-confirm-rename-file-names’ is ‘nil’, changing the file name happens without confirmation. This requires a matching entry in ‘tramp-default-rename-alist’. Remote buffers related to the remote connection identified by SOURCE, which are not visiting files, or which are visiting files not matching SOURCE, are not modified. Interactively, TARGET is selected from ‘tramp-default-rename-alist’ without confirmation if the prefix argument is non-‘nil’. The remote connection identified by SOURCE is flushed by ‘tramp-cleanup-connection’. -- Command: tramp-rename-these-files target Replace visiting file names to TARGET. The current buffer must be related to a remote connection. In all buffers, which are visiting a file with the same directory name, the buffer file name is changed. Interactively, TARGET is selected from ‘tramp-default-rename-alist’ without confirmation if the prefix argument is non-‘nil’. -- User Option: tramp-default-rename-alist The default target for renaming remote buffer file names. This is an alist of cons cells ‘(source . target)’. The first matching item specifies the target to be applied for renaming buffer file names from source via ‘tramp-rename-files’. ‘source’ is a regular expressions, which matches a remote file name. ‘target’ must be a directory name, which could be remote (including remote directories Tramp infers by default, such as ‘/method:user@host:’). ‘target’ can contain the patterns ‘%m’, ‘%u’ or ‘%h’, which are replaced by the method name, user name or host name of ‘source’ when calling ‘tramp-rename-files’. ‘source’ could also be a Lisp form, which will be evaluated. The result must be a string or ‘nil’, which is interpreted as a regular expression which always matches. Example entries: ("/ssh:badhost:/path/to/dir/" . "/ssh:goodhost:/path/to/another/dir/") would trigger renaming of buffer file names on ‘badhost’ to ‘goodhost’, including changing the directory name. ("/ssh:.+\\.company\\.org:" . "/ssh:multi.hop|ssh:%h:") routes all connections to a host in ‘company.org’ via ‘/ssh:multi.hop:’, which might be useful when using Emacs outside the company network. (nil . "~/saved-files/%m:%u@%h/") saves all remote files locally, with a directory name including method name, user name and host name of the remote connection. -- User Option: tramp-confirm-rename-file-names Whether renaming a buffer file name by ‘tramp-rename-files’ or ‘tramp-rename-these-files’ must be confirmed.  File: tramp.info, Node: Archive file names, Prev: Renaming remote files, Up: Usage 5.8 Archive file names ====================== TRAMP offers also transparent access to files inside file archives. This is possible only on hosts which have installed GVFS (the GNOME Virtual File System), *note GVFS-based methods::. Internally, file archives are mounted via the GVFS ‘archive’ method. A file archive is a regular file of kind ‘/path/to/dir/file.EXT’. The extension ‘.EXT’ identifies the type of the file archive. A file inside a file archive, called archive file name, has the name ‘/path/to/dir/file.EXT/dir/file’. Most of the *note magic file name operations: (elisp)Magic File Names, are implemented for archive file names, exceptions are all operations which write into a file archive, and process related operations. Therefore, functions like (copy-file "/path/to/dir/file.tar/dir/file" "/somewhere/else") work out of the box. This is also true for file name completion, and for libraries like ‘dired’ or ‘ediff’, which accept archive file names as well. File archives are identified by the file name extension ‘.EXT’. Since GVFS uses internally the library ‘libarchive(3)’, all suffixes, which are accepted by this library, work also for archive file names. Accepted suffixes are listed in the constant ‘tramp-archive-suffixes’. They are • ‘.7z’ — 7-Zip archives • ‘.apk’ — Android package kits • ‘.ar’ — UNIX archiver formats • ‘.cab’, ‘.CAB’ — Microsoft Windows cabinets • ‘.cpio’ — CPIO archives • ‘.deb’ — Debian packages • ‘.depot’ — HP-UX SD depots • ‘.exe’ — Self extracting Microsoft Windows EXE files • ‘.iso’ — ISO 9660 images • ‘.jar’ — Java archives • ‘.lzh’, ‘.LZH’ — Microsoft Windows compressed LHA archives • ‘.msu’, ‘.MSU’ — Microsoft Windows Update packages • ‘.mtree’ — BSD mtree format • ‘.odb’, ‘.odf’, ‘.odg’, ‘.odp’, ‘.ods’, ‘.odt’ — OpenDocument formats • ‘.pax’ — Posix archives • ‘.rar’ — RAR archives • ‘.rpm’ — Red Hat packages • ‘.shar’ — Shell archives • ‘.tar’, ‘.tbz’, ‘.tgz’, ‘.tlz’, ‘.txz’, ‘.tzst’ — (Compressed) tape archives • ‘.warc’ — Web archives • ‘.xar’ — macOS XAR archives • ‘.xpi’ — XPInstall Mozilla addons • ‘.xps’ — Open XML Paper Specification (OpenXPS) documents • ‘.zip’, ‘.ZIP’ — ZIP archives File archives could also be compressed, identified by an additional compression suffix. Valid compression suffixes are listed in the constant ‘tramp-archive-compression-suffixes’. They are ‘.bz2’, ‘.gz’, ‘.lrz’, ‘.lz’, ‘.lz4’, ‘.lzma’, ‘.lzo’, ‘.uu’, ‘.xz’, ‘.Z’, and ‘.zst’. A valid archive file name would be ‘/path/to/dir/file.tar.gz/dir/file’. Even several suffixes in a row are possible, like ‘/path/to/dir/file.tar.gz.uu/dir/file’. An archive file name could be a remote file name, as in ‘/ftp:anonymous@ftp.gnu.org:/gnu/tramp/tramp-2.4.5.tar.gz/INSTALL’. Since all file operations are mapped internally to GVFS operations, remote file names supported by ‘tramp-gvfs’ perform better, because no local copy of the file archive must be downloaded first. For example, ‘/sftp:user@host:...’ performs better than the similar ‘/scp:user@host:...’. See the constant ‘tramp-archive-all-gvfs-methods’ for a complete list of ‘tramp-gvfs’ supported method names. If ‘url-handler-mode’ is enabled, archives could be visited via URLs, like ‘https://ftp.gnu.org/gnu/tramp/tramp-2.4.5.tar.gz/INSTALL’. This allows complex file operations like (progn (url-handler-mode 1) (ediff-directories "https://ftp.gnu.org/gnu/tramp/tramp-2.4.4.tar.gz/tramp-2.4.4" "https://ftp.gnu.org/gnu/tramp/tramp-2.4.5.tar.gz/tramp-2.4.5" "")) It is even possible to access file archives in file archives, as (progn (url-handler-mode 1) (find-file "http://ftp.debian.org/debian/pool/main/c/coreutils/coreutils_8.28-1_amd64.deb/control.tar.gz/control")) In order to disable file archives, you could add the following form to your init file: (customize-set-variable 'tramp-archive-enabled nil)  File: tramp.info, Node: Bug Reports, Next: Frequently Asked Questions, Prev: Usage, Up: Top 6 Reporting Bugs and Problems ***************************** TRAMP’s development team is actively engaged in solving bugs and problems and looks to feature requests and suggestions. TRAMP’s mailing list is the place for more advice and information on working with TRAMP, solving problems, discussing, and general discussions about TRAMP. TRAMP’s mailing list is moderated but even non-subscribers can post for moderator approval. Sometimes this approval step may take as long as 48 hours due to public holidays. is the mailing list. Messages sent to this address go to all the subscribers. This is _not_ the address to send subscription requests to. To subscribe to the mailing list, visit: the TRAMP Mail Subscription Page (https://lists.gnu.org/mailman/listinfo/tramp-devel/). Check if the bug or problem is already addressed in *Note Frequently Asked Questions::. Run ‘M-x tramp-bug ’ to generate a buffer with details of the system along with the details of the TRAMP installation. Please include these details with the bug report. The bug report must describe in as excruciating detail as possible the steps required to reproduce the problem. These details must include the setup of the remote host and any special or unique conditions that exist. Include a minimal test case that reproduces the problem. This will help the development team find the best solution and avoid unrelated detours. To exclude cache-related problems, flush all caches before running the test, *note Cleanup remote connections::. Alternatively, and often better for analysis, reproduce the problem in a clean Emacs session started with ‘emacs -Q’. Then, TRAMP does not load the persistency file (*note Connection caching::), and it does not use passwords from ‘auth-source.el’ (*note Password handling::). When including TRAMP’s messages in the bug report, increase the verbosity level to 6 (*note Traces: Traces and Profiles.) in the ‘~/.emacs’ file before repeating steps to the bug. Include the contents of the ‘*tramp/foo*’ and ‘*debug tramp/foo*’ buffers with the bug report. Both buffers could contain non-ASCII characters which are relevant for analysis, append the buffers as attachments to the bug report. This is also needed in order to avoid line breaks during mail transfer. *Note* that a verbosity level greater than 6 is not necessary at this stage. Also note that a verbosity level of 6 or greater, the contents of files and directories will be included in the debug buffer. Passwords typed in TRAMP will never be included there.  File: tramp.info, Node: Frequently Asked Questions, Next: Files directories and localnames, Prev: Bug Reports, Up: Top 7 Frequently Asked Questions **************************** • Where is the latest TRAMP? TRAMP is available at the GNU URL: TRAMP’s GNU project page is located here: • Which systems does it work on? The package works successfully on Emacs 25, Emacs 26, Emacs 27, and Emacs 28. While Unix and Unix-like systems are the primary remote targets, TRAMP has equal success connecting to other platforms, such as MS Windows 7/8/10. • How to speed up TRAMP? TRAMP does many things in the background, some of which depends on network speeds, response speeds of remote hosts, and authentication delays. During these operations, TRAMP’s responsiveness slows down. Some suggestions within the scope of TRAMP’s settings include: Use an external method, such as ‘scp’, which are faster than internal methods. Keep the file ‘tramp-persistency-file-name’, which is where TRAMP caches remote information about hosts and files. Caching is enabled by default. Don’t disable it. Set ‘remote-file-name-inhibit-cache’ to ‘nil’ if remote files are not independently updated outside TRAMP’s control. That cache cleanup will be necessary if the remote directories or files are updated independent of TRAMP. Disable version control to avoid delays: (setq vc-ignore-dir-regexp (format "\\(%s\\)\\|\\(%s\\)" vc-ignore-dir-regexp tramp-file-name-regexp)) If this is too radical, because you want to use version control remotely, trim ‘vc-handled-backends’ to just those you care about, for example: (setq vc-handled-backends '(SVN Git)) Disable excessive traces. Set ‘tramp-verbose’ to 3 or lower, default being 3. Increase trace levels temporarily when hunting for bugs. • TRAMP does not connect to the remote host Three main reasons for why TRAMP does not connect to the remote host: − Unknown characters in the prompt TRAMP needs a clean recognizable prompt on the remote host for accurate parsing. Shell prompts that contain escape sequences for coloring cause parsing problems. *note Remote shell setup:: for customizing prompt detection using regular expressions. To check if the remote host’s prompt is being recognized, use this test: switch to TRAMP connection buffer ‘*tramp/foo*’, put the cursor at the top of the buffer, and then apply the following expression: M-: (re-search-forward (concat tramp-shell-prompt-pattern "$")) If the cursor has not moved to the prompt at the bottom of the buffer, then TRAMP has failed to recognize the prompt. When using zsh on remote hosts, disable zsh line editor because zsh uses left-hand side and right-hand side prompts in parallel. Add the following line to ‘~/.zshrc’: [[ $TERM == "dumb" ]] && unsetopt zle && PS1='$ ' && return This uses the default value of ‘tramp-terminal-type’, "dumb", as value of the ‘TERM’ environment variable. If you want to use another value for ‘TERM’, change ‘tramp-terminal-type’ and this line accordingly. Alternatively, you could set the remote login shell explicitly. See *note Remote shell setup:: for discussion of this technique, When using fish shell on remote hosts, disable fancy formatting by adding the following to ‘~/.config/fish/config.fish’: function fish_prompt if test $TERM = "dumb" echo "\$ " else ... end end When using WinSSHD on remote hosts, TRAMP does not recognize the strange prompt settings. A similar problem exist with the iTerm2 shell integration, which sends proprietary escape codes when starting a shell. This can be suppressed by changing the respective integration snippet in your ‘~/.profile’ like this: [ $TERM = "dumb" ] || \ test -e "${HOME}/.iterm2_shell_integration.bash" && \ source "${HOME}/.iterm2_shell_integration.bash" And finally, bash’s readline should not use key bindings like ‘C-j’ to commands. Disable this in your ‘~/.inputrc’: $if term=dumb # Don't bind Control-J or it messes up TRAMP. $else "\C-j": next-history $endif − Echoed characters after login TRAMP suppresses echos from remote hosts with the ‘stty -echo’ command. But sometimes it is too late to suppress welcome messages from the remote host containing harmful control characters. Using ‘sshx’ or ‘scpx’ methods can avoid this problem because they allocate a pseudo tty. *Note Inline methods::. − TRAMP stops transferring strings longer than 500 characters Set ‘tramp-chunksize’ to 500 to get around this problem, which is related to faulty implementation of ‘process-send-string’ on HP-UX, FreeBSD and Tru64 Unix systems. Consult the documentation for ‘tramp-chunksize’ to see when this is necessary. Set ‘file-precious-flag’ to ‘t’ for files accessed by TRAMP so the file contents are checked using checksum by first saving to a temporary file. *note (elisp)Saving Buffers::. (add-hook 'find-file-hook (lambda () (when (file-remote-p default-directory) (set (make-local-variable 'file-precious-flag) t)))) • TRAMP fails in a chrooted environment When connecting to a local host, TRAMP uses some internal optimizations. They fail when Emacs runs in a chrooted environment. In order to disable those optimizations, set user option ‘tramp-local-host-regexp’ to ‘nil’. • TRAMP does not recognize if a ‘ssh’ session hangs ‘ssh’ sessions on the local host hang when the network is down. TRAMP cannot safely detect such hangs. The network configuration for ‘ssh’ can be configured to kill such hangs with the following command in the ‘~/.ssh/config’: Host * ServerAliveInterval 5 • TRAMP does not use default ‘ssh’ ‘ControlPath’ TRAMP overwrites ‘ControlPath’ settings when initiating ‘ssh’ sessions. TRAMP does this to fend off a stall if a master session opened outside the Emacs session is no longer open. That is why TRAMP prompts for the password again even if there is an ‘ssh’ already open. Some ‘ssh’ versions support a ‘ControlPersist’ option, which allows you to set the ‘ControlPath’ provided the variable ‘tramp-ssh-controlmaster-options’ is customized as follows: (customize-set-variable 'tramp-ssh-controlmaster-options (concat "-o ControlPath=/tmp/ssh-ControlPath-%%r@%%h:%%p " "-o ControlMaster=auto -o ControlPersist=yes")) Note how ‘%r’, ‘%h’ and ‘%p’ must be encoded as ‘%%r’, ‘%%h’ and ‘%%p’. If the ‘~/.ssh/config’ file is configured appropriately for the above behavior, then any changes to ‘ssh’ can be suppressed with this ‘nil’ setting: (customize-set-variable 'tramp-use-ssh-controlmaster-options nil) This should also be set to ‘nil’ if you use the ‘ProxyCommand’ or ‘ProxyJump’ options in your ‘ssh’ configuration. On MS Windows, ‘tramp-use-ssh-controlmaster-options’ is set to ‘nil’ by default, because the MS Windows and MSYS2 implementations of ‘OpenSSH’ do not support this option properly. • On multi-hop connections, TRAMP does not use ‘ssh’ ‘ControlMaster’ In order to use the ‘ControlMaster’ option, TRAMP must check whether the ‘ssh’ client supports this option. This is only possible on the local host, for the first hop. TRAMP does not use this option on proxy hosts. If you want to use this option also for the other hops, you must configure ‘~/.ssh/config’ on the proxy host: Host * ControlMaster auto ControlPath tramp.%C ControlPersist no Check the ‘ssh_config(5)’ man page whether these options are supported on your proxy host. • TRAMP does not connect to Samba or MS Windows hosts running SMB1 connection protocol Recent versions of ‘smbclient’ do not support old connection protocols by default. In order to connect to such a host, add a respective option: (add-to-list 'tramp-smb-options "client min protocol=NT1") *Note* that using a deprecated connection protocol raises security problems, you should do it only if absolutely necessary. • File name completion does not work with TRAMP ANSI escape sequences from the remote shell may cause errors in TRAMP’s parsing of remote buffers. To test if this is the case, open a remote shell and check if the output of ‘ls’ is in color. To disable ANSI escape sequences from the remote hosts, disable ‘--color=yes’ or ‘--color=auto’ in the remote host’s ‘.bashrc’ or ‘.profile’. Turn this alias on and off to see if file name completion works. • File name completion does not work in directories with large number of files This may be related to globbing, which is the use of shell’s ability to expand wild card specifications, such as ‘*.c’. For directories with large number of files, globbing might exceed the shell’s limit on length of command lines and hang. TRAMP uses globbing. To test if globbing hangs, open a shell on the remote host and then run ‘ls -d * ..?* > /dev/null’. When testing, ensure the remote shell is the same shell (‘/bin/sh’, ‘ksh’ or ‘bash’), that TRAMP uses when connecting to that host. • How to get notified after TRAMP completes file transfers? Make Emacs beep after reading from or writing to the remote host with the following code in ‘~/.emacs’. (defadvice tramp-handle-write-region (after tramp-write-beep-advice activate) "Make TRAMP beep after writing a file." (interactive) (beep)) (defadvice tramp-handle-do-copy-or-rename-file (after tramp-copy-beep-advice activate) "Make TRAMP beep after copying a file." (interactive) (beep)) (defadvice tramp-handle-insert-file-contents (after tramp-insert-beep-advice activate) "Make TRAMP beep after inserting a file." (interactive) (beep)) • How to get a Visual Warning when working with ‘root’ privileges? Host indication in the mode line? Install ‘tramp-theme’ from GNU ELPA via Emacs’s Package Manager. Enable it via ‘M-x load-theme tramp ’. Further customization is explained in user option ‘tramp-theme-face-remapping-alist’. • Remote host does not understand default options for directory listing Emacs computes the ‘dired’ options based on the local host but if the remote host cannot understand the same ‘ls’ command, then set them with a hook as follows: (add-hook 'dired-before-readin-hook (lambda () (when (file-remote-p default-directory) (setq dired-actual-switches "-al")))) • Why is ‘~/.sh_history’ on the remote host growing? Due to the remote shell saving tilde expansions triggered by TRAMP, the history file is probably growing rapidly. TRAMP can suppress this behavior with the user option ‘tramp-histfile-override’. When set to ‘t’, environment variable ‘HISTFILE’ is unset, and environment variables ‘HISTFILESIZE’ and ‘HISTSIZE’ are set to 0. Don’t use this with ‘bash’ 5.0.0. There is a bug in ‘bash’ which lets ‘bash’ die. Alternatively, ‘tramp-histfile-override’ could be a string. Environment variable ‘HISTFILE’ is set to this file name then. Be careful when setting to ‘/dev/null’; this might result in undesired results when using ‘bash’ as remote shell. Another approach is to disable TRAMP’s handling of the ‘HISTFILE’ at all by setting ‘tramp-histfile-override’ to ‘nil’. In this case, saving history could be turned off by putting this shell code in ‘.bashrc’ or ‘.kshrc’: if [ -f $HOME/.sh_history ] ; then /bin/rm $HOME/.sh_history fi if [ "${HISTFILE-unset}" != "unset" ] ; then unset HISTFILE fi if [ "${HISTSIZE-unset}" != "unset" ] ; then unset HISTSIZE fi For ‘ssh’-based method, add the following line to your ‘~/.ssh/environment’: HISTFILE=/dev/null • Where are remote files trashed to? Emacs can trash file instead of deleting them, *note Trashing: (emacs)Misc File Ops. Remote files are always trashed to the local trash, except remote encrypted files (*note Keeping files encrypted::), which are deleted anyway. If Emacs is configured to use the XDG conventions for the trash directory, remote files cannot be restored with the respective tools, because those conventions don’t specify remote paths. Such files must be restored by moving them manually from ‘${XDG_DATA_HOME}/Trash/files/’, if needed. • How to shorten long file names when typing in TRAMP? Adapt several of these approaches to reduce typing. If the full name is ‘/ssh:news@news.my.domain:/opt/news/etc’, then: 1. Use simplified syntax: If you always apply the default method (*note Default Method::), you could use the simplified TRAMP syntax (*note Change file name syntax::): (customize-set-variable 'tramp-default-method "ssh") (tramp-change-syntax 'simplified) The reduced typing: ‘C-x C-f /news@news.my.domain:/opt/news/etc ’. 2. Use default values for method name and user name: You can define default methods and user names for hosts, (*note Default Method::, *note Default User::): (custom-set-variables '(tramp-default-method "ssh") '(tramp-default-user "news")) The reduced typing: ‘C-x C-f /-:news.my.domain:/opt/news/etc ’. *Note* that there are some useful shortcuts already. Accessing your local host as ‘root’ user, is possible just by ‘C-x C-f /su:: ’. 3. Use configuration options of the access method: Programs used for access methods already offer powerful configurations (*note Customizing Completion::). For ‘ssh’, configure the file ‘~/.ssh/config’: Host xy HostName news.my.domain User news The reduced typing: ‘C-x C-f /ssh:xy:/opt/news/etc ’. Depending on the number of files in the directories, host names completion can further reduce key strokes: ‘C-x C-f /ssh:x ’. 4. Use environment variables to expand long strings: For long file names, set up environment variables that are expanded in the minibuffer. Environment variables are set either outside Emacs or inside Emacs with Lisp: (setenv "xy" "/ssh:news@news.my.domain:/opt/news/etc/") The reduced typing: ‘C-x C-f $xy ’. *Note* that file name cannot be edited here because the environment variables are not expanded during editing in the minibuffer. 5. Define own keys: Redefine another key sequence in Emacs for ‘C-x C-f’: (global-set-key [(control x) (control y)] (lambda () (interactive) (find-file (read-file-name "Find TRAMP file: " "/ssh:news@news.my.domain:/opt/news/etc/")))) Simply typing ‘C-x C-y’ would prepare minibuffer editing of file name. See the Emacs Wiki (https://www.emacswiki.org/emacs/TrampMode) for a more comprehensive example. 6. Define own abbreviation (1): Abbreviation list expansion can be used to reduce typing long file names: (add-to-list 'directory-abbrev-alist '("^/xy" . "/ssh:news@news.my.domain:/opt/news/etc/")) The reduced typing: ‘C-x C-f /xy ’. *Note* that file name cannot be edited here because the abbreviations are not expanded during editing in the minibuffer. Furthermore, the abbreviation is not expanded during completion. 7. Define own abbreviation (2): The ‘abbrev-mode’ gives additional flexibility for editing in the minibuffer: (define-abbrev-table 'my-tramp-abbrev-table '(("xy" "/ssh:news@news.my.domain:/opt/news/etc/"))) (add-hook 'minibuffer-setup-hook (lambda () (abbrev-mode 1) (setq local-abbrev-table my-tramp-abbrev-table))) (defadvice minibuffer-complete (before my-minibuffer-complete activate) (expand-abbrev)) ;; If you use partial-completion-mode (defadvice PC-do-completion (before my-PC-do-completion activate) (expand-abbrev)) The reduced typing: ‘C-x C-f xy ’. The minibuffer expands for further editing. 8. Use bookmarks: Use bookmarks to save TRAMP file names. *note (emacs)Bookmarks::. Upon visiting a location with TRAMP, save it as a bookmark with ‘ ’. To revisit that bookmark: ‘ ’. 9. Use recent files: ‘recentf’ remembers visited places. *note (emacs)File Conveniences::. Keep remote file names in the recent list without have to check for their accessibility through remote access: (recentf-mode 1) Reaching recently opened files: ‘ ’. 10. Use filecache: Since ‘filecache’ remembers visited places, add the remote directory to the cache: (with-eval-after-load 'filecache (file-cache-add-directory "/ssh:news@news.my.domain:/opt/news/etc/")) Then use directory completion in the minibuffer with ‘C-x C-f C-’. 11. Use bbdb: ‘bbdb’ has a built-in feature for Ange FTP files, which also works for TRAMP file names. *note Storing FTP sites in the BBDB: (bbdb)bbdb-ftp. Load ‘bbdb’ in Emacs: (require 'bbdb) (bbdb-initialize) Create a BBDB entry with ‘M-x bbdb-create-ftp-site ’. Then specify a method and user name where needed. Examples: M-x bbdb-create-ftp-site Ftp Site: news.my.domain Ftp Directory: /opt/news/etc/ Ftp Username: ssh:news Company: Additional Comments: In BBDB buffer, access an entry by pressing the key ‘F’. Thanks to TRAMP users for contributing to these recipes. • Why saved multi-hop file names do not work in a new Emacs session? When saving ad-hoc multi-hop TRAMP file names (*note Ad-hoc multi-hops::) via bookmarks, recent files, filecache, bbdb, or another package, use the full ad-hoc file name including all hops, like ‘/ssh:bird@bastion|ssh:news.my.domain:/opt/news/etc’. Alternatively, when saving abbreviated multi-hop file names ‘/ssh:news@news.my.domain:/opt/news/etc’, the user option ‘tramp-save-ad-hoc-proxies’ must be set non-‘nil’ value. • How to connect to a remote Emacs session using TRAMP? Configure Emacs Client (*note (emacs)Emacs Server::). Then on the remote host, start the Emacs Server: (require 'server) (setq server-host (system-name) server-use-tcp t) (server-start) If ‘(system-name)’ of the remote host cannot be resolved on the local host, use IP address instead. Copy from the remote host the resulting file ‘~/.emacs.d/server/server’ to the local host, to the same location. Then start Emacs Client from the command line: emacsclient /ssh:user@host:/file/to/edit ‘user’ and ‘host’ refer to the local host. To make Emacs Client an editor for other programs, use a wrapper script ‘emacsclient.sh’: #!/bin/sh emacsclient /ssh:$(whoami)@$(hostname --fqdn):$1 Then change the environment variable ‘EDITOR’ to point to the wrapper script: export EDITOR=/path/to/emacsclient.sh • How to determine whether a buffer is remote? The buffer-local variable ‘default-directory’ tells this. If the form ‘(file-remote-p default-directory)’ returns non-‘nil’, the buffer is remote. See the optional arguments of ‘file-remote-p’ for determining details of the remote connection. • How to save files when a remote host isn’t reachable anymore? If the local machine Emacs is running on changes its network integration, remote hosts could become unreachable. This happens for example, if the local machine is moved between your office and your home without restarting Emacs. In such cases, the command ‘tramp-rename-files’ can be used to alter remote buffers’ method, host, and/or directory names. This permits saving their contents in the same location via another network path, or somewhere else entirely (including locally). *note Renaming remote files::. • How to prevent TRAMP from clearing the ‘recentf-list’? When TRAMP cleans a connection, it removes the respective remote file name(s) from ‘recentf-list’. This is needed, because an unresponsive remote host could trigger ‘recentf’ to connect that host again and again. If you find the cleanup disturbing, because the file names in ‘recentf-list’ are precious to you, you could add the following two forms in your ‘~/.emacs’ after loading the ‘tramp’ and ‘recentf’ packages: (remove-hook 'tramp-cleanup-connection-hook #'tramp-recentf-cleanup) (remove-hook 'tramp-cleanup-all-connections-hook #'tramp-recentf-cleanup-all) • I get a warning ‘Tramp has been compiled with Emacs a.b, this is Emacs c.d’ • I get an error ‘tramp-file-name-handler: Invalid function: tramp-compat-with-mutex’ TRAMP comes with compatibility code for different Emacs versions. When you see such a message (the text might differ), you don’t use the Emacs built-in version of TRAMP. In case you have installed TRAMP from GNU ELPA, see the package README file for instructions how to recompile it. • I get an error ‘Remote file error: Forbidden reentrant call of Tramp’ Timers, process filters and sentinels, and other event based functions can run at any time, when a remote file operation is still running. This can cause TRAMP to block. When such a situation is detected, this error is triggered. It should be fixed in the respective function (sending an error report will help), but for the time being you can suppress this error by the following code in your ‘~/.emacs’: (setq debug-ignored-errors (cons 'remote-file-error debug-ignored-errors)) • How to disable other packages from calling TRAMP? There are packages that call TRAMP without the user ever entering a remote file name. Even without applying a remote file syntax, some packages enable TRAMP on their own. How can users disable such features. − ‘ido.el’ Disable TRAMP file name completion: (customize-set-variable 'ido-enable-tramp-completion nil) − ‘rlogin.el’ Disable remote directory tracking mode: (rlogin-directory-tracking-mode -1) • How to disable TRAMP? − To keep Ange FTP as default the remote files access package, set this in ‘.emacs’: (customize-set-variable 'tramp-default-method "ftp") If you want to enable Ange FTP’s syntax, add the following form: (tramp-change-syntax 'simplified) − To disable both TRAMP (and Ange FTP), set ‘tramp-mode’ to ‘nil’ in ‘.emacs’. *Note*, that we don’t use ‘customize-set-variable’, in order to avoid loading TRAMP. (setq tramp-mode nil) − To deactivate TRAMP for some look-alike remote file names, set ‘tramp-ignored-file-name-regexp’ to a proper regexp in ‘.emacs’. *Note*, that we don’t use ‘customize-set-variable’, in order to avoid loading TRAMP. (setq tramp-ignored-file-name-regexp "\\`/ssh:example\\.com:") This is needed, if you mount for example a virtual file system on your local host’s root directory as ‘/ssh:example.com:’. − To unload TRAMP, type ‘M-x tramp-unload-tramp ’. Unloading TRAMP resets Ange FTP plugins also.  File: tramp.info, Node: Files directories and localnames, Next: Traces and Profiles, Prev: Frequently Asked Questions, Up: Top 8 How file names, directories and localnames are mangled and managed ******************************************************************** * Menu: * Localname deconstruction:: Splitting a localname into its component parts. * External packages:: Integrating with external Lisp packages.  File: tramp.info, Node: Localname deconstruction, Next: External packages, Up: Files directories and localnames 8.1 Splitting a localname into its component parts ================================================== TRAMP package redefines lisp functions ‘file-name-directory’ and ‘file-name-nondirectory’ to accommodate the unique file naming syntax that TRAMP requires. The replacements dissect the file name, use the original handler for the localname, take that result, and then re-build the TRAMP file name. By relying on the original handlers for localnames, TRAMP benefits from platform specific hacks to the original handlers.  File: tramp.info, Node: External packages, Prev: Localname deconstruction, Up: Files directories and localnames 8.2 Integrating with external Lisp packages =========================================== 8.2.1 File name completion -------------------------- Sometimes, it is not convenient to open a new connection to a remote host, including entering the password and alike. For example, this is nasty for packages providing file name completion. Such a package could signal to TRAMP, that they don’t want it to establish a new connection. Use the variable ‘non-essential’ temporarily and bind it to non-‘nil’ value. (let ((non-essential t)) ...) 8.2.2 File attributes cache --------------------------- Keeping a local cache of remote file attributes in sync with the remote host is a time-consuming operation. Flushing and re-querying these attributes can tax TRAMP to a grinding halt on busy remote servers. To get around these types of slow-downs in TRAMP’s responsiveness, set the ‘process-file-side-effects’ to ‘nil’ to stop TRAMP from flushing the cache. This is helpful in situations where callers to ‘process-file’ know there are no file attribute changes. The let-bind form to accomplish this: (let (process-file-side-effects) ...) For asynchronous processes, TRAMP uses a process sentinel to flush file attributes cache. When callers to ‘start-file-process’ know beforehand no file attribute changes are expected, then the process sentinel should be set to the default state. In cases where the caller defines its own process sentinel, TRAMP’s process sentinel is overwritten. The caller can still flush the file attributes cache in its process sentinel with this code: (unless (memq (process-status proc) '(run open)) (dired-uncache remote-directory)) Since TRAMP traverses subdirectories starting with the root directory, it is most likely sufficient to make the ‘default-directory’ of the process buffer as the root directory. 8.2.3 Timers ------------ Timers run asynchronously at any time when Emacs is waiting for sending a string to a process, or waiting for process output. They can run any remote file operation, which would conflict with the already running remote file operation, if the same connection is affected. TRAMP detects this situation, and raises the ‘remote-file-error’ error. A timer function should avoid this situation. As a minimum, it should protect itself against this error, by wrapping the timer function body as follows: (ignore-error 'remote-file-error ...)  File: tramp.info, Node: Traces and Profiles, Next: GNU Free Documentation License, Prev: Files directories and localnames, Up: Top 9 How to Customize Traces ************************* TRAMP messages are raised with verbosity levels ranging from 0 to 10. TRAMP does not display all messages; only those with a verbosity level less than or equal to ‘tramp-verbose’. The verbosity levels are 0 silent (no TRAMP messages at all) 1 errors 2 warnings 3 connection to remote hosts (default verbosity) 4 activities 5 internal 6 sent and received strings 7 file caching 8 connection properties 9 test commands 10 traces (huge) 11 call traces (maintainer only) With ‘tramp-verbose’ greater than or equal to 4, messages are also written to a TRAMP debug buffer. Such debug buffers are essential to bug and problem analyses. For TRAMP bug reports, set the ‘tramp-verbose’ level to 6 (*note Bug Reports::). The debug buffer is in *note (emacs)Outline Mode::. In this buffer, messages can be filtered by their level. To see messages up to verbosity level 5, enter ‘C-u 6 C-c C-q’. Other navigation keys are described in *note (emacs)Outline Visibility::. TRAMP handles errors internally. Hence, to get a Lisp backtrace, the following settings are required: (setq debug-on-error t debug-on-signal t) If ‘tramp-verbose’ is greater than or equal to 10, Lisp backtraces are also added to the TRAMP debug buffer in case of errors. In very rare cases it could happen, that TRAMP blocks Emacs. Killing Emacs does not allow inspecting the debug buffer. In that case, you can instruct TRAMP to mirror the debug buffer to a file: (customize-set-variable 'tramp-debug-to-file t) The debug buffer is written as a file in your ‘temporary-file-directory’, which is usually ‘/tmp/’. Use this option with care, because it could decrease the performance of TRAMP actions. If ‘tramp-verbose’ is greater than or equal to 11, TRAMP function call traces are written to the buffer ‘*trace-output*’.  File: tramp.info, Node: GNU Free Documentation License, Next: Function Index, Prev: Traces and Profiles, Up: Top Appendix A GNU Free Documentation License ***************************************** Version 1.3, 3 November 2008 Copyright © 2000, 2001, 2002, 2007, 2008, 2009 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document “free” in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of “copyleft”, which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The “Document”, below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as “you”. You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A “Modified Version” of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A “Secondary Section” is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document’s overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The “Invariant Sections” are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The “Cover Texts” are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A “Transparent” copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not “Transparent” is called “Opaque”. Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. The “Title Page” means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, “Title Page” means the text near the most prominent appearance of the work’s title, preceding the beginning of the body of the text. The “publisher” means any person or entity that distributes copies of the Document to the public. A section “Entitled XYZ” means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as “Acknowledgements”, “Dedications”, “Endorsements”, or “History”.) To “Preserve the Title” of such a section when you modify the Document means that it remains a section “Entitled XYZ” according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. 2. VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. 3. COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document’s license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document’s license notice. H. Include an unaltered copy of this License. I. Preserve the section Entitled “History”, Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled “History” in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the “History” section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K. For any section Entitled “Acknowledgements” or “Dedications”, Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. M. Delete any section Entitled “Endorsements”. Such a section may not be included in the Modified Version. N. Do not retitle any existing section to be Entitled “Endorsements” or to conflict in title with any Invariant Section. O. Preserve any Warranty Disclaimers. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version’s license notice. These titles must be distinct from any other section titles. You may add a section Entitled “Endorsements”, provided it contains nothing but endorsements of your Modified Version by various parties—for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. 5. COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled “History” in the various original documents, forming one section Entitled “History”; likewise combine any sections Entitled “Acknowledgements”, and any sections Entitled “Dedications”. You must delete all sections Entitled “Endorsements.” 6. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an “aggregate” if the copyright resulting from the compilation is not used to limit the legal rights of the compilation’s users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document’s Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. 8. TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled “Acknowledgements”, “Dedications”, or “History”, the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See . Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License “or any later version” applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy’s public statement of acceptance of a version permanently authorizes you to choose that version for the Document. 11. RELICENSING “Massive Multiauthor Collaboration Site” (or “MMC Site”) means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A “Massive Multiauthor Collaboration” (or “MMC”) contained in the site means any set of copyrightable works thus published on the MMC site. “CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. “Incorporate” means to publish or republish a Document, in whole or in part, as part of another Document. An MMC is “eligible for relicensing” if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. ADDENDUM: How to use this License for your documents ==================================================== To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright (C) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled ``GNU Free Documentation License''. If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the “with...Texts.” line with this: with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software.  File: tramp.info, Node: Function Index, Next: Variable Index, Prev: GNU Free Documentation License, Up: Top Function Index ************** [index] * Menu: * make-process: Remote processes. (line 277) * my-tramp-parse: Customizing Completion. (line 89) * start-file-process: Remote processes. (line 277) * tramp-bug: Bug Reports. (line 24) * tramp-change-syntax: Change file name syntax. (line 10) * tramp-cleanup-all-buffers: Cleanup remote connections. (line 33) * tramp-cleanup-all-connections: Cleanup remote connections. (line 28) * tramp-cleanup-connection: Cleanup remote connections. (line 8) * tramp-cleanup-this-connection: Cleanup remote connections. (line 24) * tramp-crypt-add-directory: Keeping files encrypted. (line 24) * tramp-crypt-remove-directory: Keeping files encrypted. (line 89) * tramp-get-completion-function: Customizing Completion. (line 16) * tramp-parse-etc-group: Customizing Completion. (line 78) * tramp-parse-hosts: Customizing Completion. (line 70) * tramp-parse-netrc: Customizing Completion. (line 82) * tramp-parse-passwd: Customizing Completion. (line 74) * tramp-parse-rhosts: Customizing Completion. (line 40) * tramp-parse-sconfig: Customizing Completion. (line 52) * tramp-parse-shostkeys: Customizing Completion. (line 57) * tramp-parse-shosts: Customizing Completion. (line 46) * tramp-parse-sknownhosts: Customizing Completion. (line 63) * tramp-rename-files: Renaming remote files. (line 11) * tramp-rename-these-files: Renaming remote files. (line 43) * tramp-set-completion-function: Customizing Completion. (line 25)  File: tramp.info, Node: Variable Index, Next: Concept Index, Prev: Function Index, Up: Top Variable Index ************** [index] * Menu: * ange-ftp-netrc-filename: Password handling. (line 39) * async-shell-command-width: Remote processes. (line 180) * auth-source-debug: Password handling. (line 37) * auth-source-save-behavior: Password handling. (line 31) * auth-sources: Password handling. (line 15) * auto-save-file-name-transforms: Auto-save and Backup. (line 58) * backup-directory-alist: Auto-save and Backup. (line 6) * COLUMNS, environment variable: Remote processes. (line 180) * ControlPath, ssh option: Frequently Asked Questions. (line 180) * ControlPersist, ssh option: Frequently Asked Questions. (line 180) * customize-package-emacs-version-alist: Obtaining TRAMP. (line 21) * debug-ignored-errors: Frequently Asked Questions. (line 645) * DISPLAY, environment variable: Remote processes. (line 108) * EDITOR, environment variable: Frequently Asked Questions. (line 587) * ENV, environment variable: Remote processes. (line 79) * ESHELL, environment variable: Remote shell setup. (line 203) * ForwardX11, ssh option: Remote processes. (line 121) * ForwardX11Trusted, ssh option: Remote processes. (line 121) * HGPLAIN, environment variable: Remote processes. (line 97) * HISTFILE, environment variable: Frequently Asked Questions. (line 316) * HISTFILESIZE, environment variable: Frequently Asked Questions. (line 316) * HISTORY, environment variable: Remote processes. (line 67) * HISTSIZE, environment variable: Frequently Asked Questions. (line 316) * INSIDE_EMACS, environment variable: Remote shell setup. (line 116) * INSIDE_EMACS, environment variable <1>: Remote shell setup. (line 203) * INSIDE_EMACS, environment variable <2>: Remote processes. (line 39) * non-essential: External packages. (line 9) * password-cache: Password handling. (line 67) * password-cache-expiry: Password handling. (line 62) * password-word-equivalents: Remote shell setup. (line 93) * PATH, environment variable: External methods. (line 185) * process-file-return-signal-string: Remote processes. (line 21) * process-file-side-effects: External packages. (line 22) * ProxyCommand, ssh option: Firewalls. (line 16) * ProxyCommand, ssh option <1>: Frequently Asked Questions. (line 205) * ProxyJump, ssh option: Frequently Asked Questions. (line 205) * remote-file-error: Frequently Asked Questions. (line 645) * remote-file-error <1>: External packages. (line 53) * remote-file-name-inhibit-cache: Frequently Asked Questions. (line 41) * RemoteCommand, ssh option: Remote shell setup. (line 36) * ServerAliveInterval, ssh option: Frequently Asked Questions. (line 170) * shell-command-switch: Remote processes. (line 173) * shell-file-name: Remote processes. (line 173) * SHELLNAME, environment variable: Remote shell setup. (line 203) * SSH_AUTH_SOCK, environment variable: Windows setup hints. (line 29) * TERM, environment variable: Remote shell setup. (line 102) * TERM, environment variable <1>: Remote shell setup. (line 116) * tramp-actions-before-shell: Remote shell setup. (line 146) * tramp-adb-connect-if-not-connected: External methods. (line 193) * tramp-adb-program: External methods. (line 185) * tramp-allow-unsafe-temporary-files: Auto-save and Backup. (line 71) * tramp-archive-all-gvfs-methods: Archive file names. (line 91) * tramp-archive-compression-suffixes: Archive file names. (line 83) * tramp-archive-enabled: Archive file names. (line 117) * tramp-archive-suffixes: Archive file names. (line 27) * tramp-auto-save-directory: Auto-save and Backup. (line 68) * tramp-backup-directory-alist: Auto-save and Backup. (line 37) * tramp-completion-function-alist: Customizing Completion. (line 6) * tramp-completion-use-auth-sources: File name completion. (line 37) * tramp-confirm-rename-file-names: Renaming remote files. (line 88) * tramp-connection-properties: Predefined connection information. (line 9) * tramp-crypt-encfs-option: Keeping files encrypted. (line 30) * tramp-crypt-save-encfs-config-remote: Keeping files encrypted. (line 51) * tramp-debug-to-file: Traces and Profiles. (line 6) * tramp-default-host: Default Host. (line 6) * tramp-default-host-alist: Default Host. (line 20) * tramp-default-method: Default Method. (line 9) * tramp-default-method-alist: Default Method. (line 17) * tramp-default-proxies-alist: Multi-hops. (line 13) * tramp-default-remote-path: Remote programs. (line 19) * tramp-default-rename-alist: Renaming remote files. (line 52) * tramp-default-user: Default User. (line 6) * tramp-default-user-alist: Default User. (line 14) * tramp-encoding-shell: Remote shell setup. (line 32) * tramp-file-name-regexp: Change file name syntax. (line 28) * tramp-gvfs-methods: GVFS-based methods. (line 80) * tramp-histfile-override: Frequently Asked Questions. (line 316) * tramp-ignored-file-name-regexp: Frequently Asked Questions. (line 693) * tramp-inline-compress-commands: Inline methods. (line 25) * tramp-inline-compress-start-size: Inline methods. (line 25) * tramp-local-host-regexp: Frequently Asked Questions. (line 163) * tramp-methods: Customizing Methods. (line 6) * tramp-mode: Frequently Asked Questions. (line 687) * tramp-own-remote-path: Remote programs. (line 32) * tramp-password-prompt-regexp: Remote shell setup. (line 72) * tramp-persistency-file-name: Connection caching. (line 6) * tramp-rclone-program: FUSE-based methods. (line 15) * tramp-remote-coding-commands: Inline methods. (line 16) * tramp-remote-path: Remote programs. (line 15) * tramp-remote-process-environment: Remote processes. (line 53) * tramp-restricted-shell-hosts-alist: Multi-hops. (line 84) * tramp-save-ad-hoc-proxies: Ad-hoc multi-hops. (line 29) * tramp-sh-extra-args: Remote shell setup. (line 22) * tramp-shell-prompt-pattern: Remote shell setup. (line 64) * tramp-smb-options: Frequently Asked Questions. (line 233) * tramp-ssh-controlmaster-options: Frequently Asked Questions. (line 186) * tramp-sshfs-program: FUSE-based methods. (line 46) * tramp-terminal-type: Remote shell setup. (line 102) * tramp-theme-face-remapping-alist: Frequently Asked Questions. (line 296) * tramp-use-ssh-controlmaster-options: Frequently Asked Questions. (line 199) * tramp-verbose: Traces and Profiles. (line 6) * tramp-version: Obtaining TRAMP. (line 6) * tramp-wrong-passwd-regexp: Remote shell setup. (line 72)  File: tramp.info, Node: Concept Index, Prev: Variable Index, Up: Top Concept Index ************* [index] * Menu: * .login file: Remote shell setup. (line 45) * .profile file: Remote shell setup. (line 45) * 7z file archive suffix: Archive file names. (line 33) * adb method: Quick Start Guide. (line 134) * adb method <1>: External methods. (line 184) * afp method: Quick Start Guide. (line 95) * afp method <1>: GVFS-based methods. (line 16) * alternative file name syntax: Change file name syntax. (line 6) * android: Quick Start Guide. (line 134) * android (with adb method): External methods. (line 184) * android shell setup for ssh: Android shell setup. (line 6) * apk file archive suffix: Archive file names. (line 35) * ar file archive suffix: Archive file names. (line 37) * archive file names: Archive file names. (line 6) * archive method: Archive file names. (line 6) * Asynchronous remote processes: Remote processes. (line 277) * auto-save: Auto-save and Backup. (line 6) * backup: Auto-save and Backup. (line 6) * base-64 encoding: Inline methods. (line 16) * base-64 encoding <1>: Inline methods. (line 16) * behind the scenes: Overview. (line 44) * bug reports: Bug Reports. (line 6) * cab file archive suffix: Archive file names. (line 39) * CAB file archive suffix: Archive file names. (line 39) * caching: Connection caching. (line 6) * change file name syntax: Change file name syntax. (line 6) * choosing the right method: Default Method. (line 43) * cleanup: Cleanup remote connections. (line 6) * compile: Remote processes. (line 6) * configuration: Configuration. (line 6) * connection types, overview: Connection types. (line 6) * cpio file archive suffix: Archive file names. (line 41) * create your own methods: Customizing Methods. (line 6) * customizing completion: Customizing Completion. (line 6) * customizing methods: Customizing Methods. (line 6) * cygwin and fakecygpty: Windows setup hints. (line 17) * cygwin and ssh-agent: Windows setup hints. (line 29) * cygwin, issues: Windows setup hints. (line 6) * dav method: Quick Start Guide. (line 95) * dav method <1>: GVFS-based methods. (line 24) * davs method: Quick Start Guide. (line 95) * davs method <1>: GVFS-based methods. (line 24) * dbus: GVFS-based methods. (line 6) * deb file archive suffix: Archive file names. (line 43) * default configuration: Configuration. (line 6) * default host: Default Host. (line 6) * default method: Default Method. (line 6) * default user: Default User. (line 6) * depot file archive suffix: Archive file names. (line 45) * details of operation: Overview. (line 44) * doas method: Quick Start Guide. (line 55) * doas method <1>: Quick Start Guide. (line 68) * doas method <2>: Inline methods. (line 71) * docker method: Customizing Methods. (line 15) * encfs: Keeping files encrypted. (line 19) * encfsctl: Keeping files encrypted. (line 19) * Encrypt remote directories: Keeping files encrypted. (line 6) * eshell: Remote processes. (line 191) * exe file archive suffix: Archive file names. (line 47) * external methods: External methods. (line 6) * fakecygpty and cygwin: Windows setup hints. (line 17) * FAQ: Frequently Asked Questions. (line 6) * fcp method: External methods. (line 76) * file archive suffix 7z: Archive file names. (line 33) * file archive suffix apk: Archive file names. (line 35) * file archive suffix ar: Archive file names. (line 37) * file archive suffix cab: Archive file names. (line 39) * file archive suffix CAB: Archive file names. (line 39) * file archive suffix cpio: Archive file names. (line 41) * file archive suffix deb: Archive file names. (line 43) * file archive suffix depot: Archive file names. (line 45) * file archive suffix exe: Archive file names. (line 47) * file archive suffix iso: Archive file names. (line 49) * file archive suffix jar: Archive file names. (line 51) * file archive suffix lzh: Archive file names. (line 53) * file archive suffix LZH: Archive file names. (line 53) * file archive suffix msu: Archive file names. (line 55) * file archive suffix MSU: Archive file names. (line 55) * file archive suffix mtree: Archive file names. (line 57) * file archive suffix odb: Archive file names. (line 60) * file archive suffix odf: Archive file names. (line 60) * file archive suffix odg: Archive file names. (line 60) * file archive suffix odp: Archive file names. (line 60) * file archive suffix ods: Archive file names. (line 60) * file archive suffix odt: Archive file names. (line 60) * file archive suffix pax: Archive file names. (line 62) * file archive suffix rar: Archive file names. (line 64) * file archive suffix rpm: Archive file names. (line 66) * file archive suffix shar: Archive file names. (line 68) * file archive suffix tar: Archive file names. (line 71) * file archive suffix tbz: Archive file names. (line 71) * file archive suffix tgz: Archive file names. (line 71) * file archive suffix tlz: Archive file names. (line 71) * file archive suffix txz: Archive file names. (line 71) * file archive suffix tzst: Archive file names. (line 71) * file archive suffix warc: Archive file names. (line 73) * file archive suffix xar: Archive file names. (line 75) * file archive suffix xpi: Archive file names. (line 77) * file archive suffix xps: Archive file names. (line 79) * file archive suffix zip: Archive file names. (line 81) * file archive suffix ZIP: Archive file names. (line 81) * file archives: Archive file names. (line 6) * file name completion: File name completion. (line 6) * file name examples: File name syntax. (line 6) * file name syntax: Quick Start Guide. (line 20) * file name syntax <1>: File name syntax. (line 6) * frequently asked questions: Frequently Asked Questions. (line 6) * fsh (with fcp method): External methods. (line 76) * fsh method: External methods. (line 86) * ftp method: External methods. (line 118) * fuse-based methods: Quick Start Guide. (line 116) * fuse-based methods <1>: FUSE-based methods. (line 6) * gdb: Remote processes. (line 224) * gdrive method: Quick Start Guide. (line 105) * gdrive method <1>: GVFS-based methods. (line 34) * git method: Customizing Methods. (line 37) * GNOME Online Accounts: Quick Start Guide. (line 105) * GNOME Online Accounts <1>: GVFS-based methods. (line 34) * GNU ELPA: Obtaining TRAMP. (line 6) * google drive: Quick Start Guide. (line 105) * google drive <1>: GVFS-based methods. (line 34) * gud.el: Remote processes. (line 224) * gvfs-based methods: Quick Start Guide. (line 95) * gvfs-based methods <1>: GVFS-based methods. (line 6) * hdfs method: Customizing Methods. (line 43) * how it works: Overview. (line 44) * http tunnel: Firewalls. (line 6) * inline methods: Inline methods. (line 6) * iso file archive suffix: Archive file names. (line 49) * jar file archive suffix: Archive file names. (line 51) * kerberos (with krlogin method): Inline methods. (line 104) * kerberos (with ksu method): Inline methods. (line 109) * krlogin method: Inline methods. (line 104) * ksu method: Inline methods. (line 109) * kubectl method: Customizing Methods. (line 21) * lxc method: Customizing Methods. (line 27) * lxd method: Customizing Methods. (line 32) * lzh file archive suffix: Archive file names. (line 53) * LZH file archive suffix: Archive file names. (line 53) * media: GVFS-based methods. (line 47) * method adb: Quick Start Guide. (line 134) * method adb <1>: External methods. (line 184) * method afp: Quick Start Guide. (line 95) * method afp <1>: GVFS-based methods. (line 16) * method archive: Archive file names. (line 6) * method dav: Quick Start Guide. (line 95) * method dav <1>: GVFS-based methods. (line 24) * method davs: Quick Start Guide. (line 95) * method davs <1>: GVFS-based methods. (line 24) * method doas: Quick Start Guide. (line 55) * method doas <1>: Quick Start Guide. (line 68) * method doas <2>: Inline methods. (line 71) * method docker: Customizing Methods. (line 15) * method fcp: External methods. (line 76) * method fsh: External methods. (line 86) * method ftp: External methods. (line 118) * method gdrive: Quick Start Guide. (line 105) * method gdrive <1>: GVFS-based methods. (line 34) * method git: Customizing Methods. (line 37) * method hdfs: Customizing Methods. (line 43) * method krlogin: Inline methods. (line 104) * method ksu: Inline methods. (line 109) * method kubectl: Customizing Methods. (line 21) * method lxc: Customizing Methods. (line 27) * method lxd: Customizing Methods. (line 32) * method mtp: Quick Start Guide. (line 95) * method mtp <1>: GVFS-based methods. (line 47) * method nc: External methods. (line 91) * method nextcloud: Quick Start Guide. (line 105) * method nextcloud <1>: GVFS-based methods. (line 64) * method plink: Quick Start Guide. (line 43) * method plink <1>: Quick Start Guide. (line 68) * method plink <2>: Inline methods. (line 114) * method plinkx: Inline methods. (line 126) * method pscp: External methods. (line 62) * method psftp: External methods. (line 62) * method rclone: Quick Start Guide. (line 116) * method rclone <1>: FUSE-based methods. (line 14) * method rcp: External methods. (line 17) * method rsh: Inline methods. (line 33) * method rsync: External methods. (line 37) * method scp: External methods. (line 25) * method scpx: External methods. (line 48) * method scpx with cygwin: Windows setup hints. (line 21) * method sftp: Quick Start Guide. (line 95) * method sftp <1>: GVFS-based methods. (line 72) * method sg: Quick Start Guide. (line 55) * method sg <1>: Inline methods. (line 77) * method smb: Quick Start Guide. (line 87) * method smb <1>: External methods. (line 124) * method ssh: Quick Start Guide. (line 43) * method ssh <1>: Quick Start Guide. (line 68) * method ssh <2>: Inline methods. (line 40) * method sshfs: Quick Start Guide. (line 116) * method sshfs <1>: FUSE-based methods. (line 45) * method sshx: Inline methods. (line 85) * method sshx with cygwin: Windows setup hints. (line 8) * method su: Quick Start Guide. (line 55) * method su <1>: Quick Start Guide. (line 68) * method su <2>: Inline methods. (line 55) * method sudo: Quick Start Guide. (line 55) * method sudo <1>: Quick Start Guide. (line 68) * method sudo <2>: Inline methods. (line 62) * method sudoedit: Quick Start Guide. (line 78) * method sudoedit <1>: External methods. (line 98) * method telnet: Inline methods. (line 50) * method vagrant: Customizing Methods. (line 48) * methods, external: External methods. (line 6) * methods, fuse: Quick Start Guide. (line 116) * methods, fuse <1>: FUSE-based methods. (line 6) * methods, gvfs: Quick Start Guide. (line 95) * methods, gvfs <1>: GVFS-based methods. (line 6) * methods, inline: Inline methods. (line 6) * ms windows (with smb method): Quick Start Guide. (line 87) * ms windows (with smb method) <1>: External methods. (line 124) * msu file archive suffix: Archive file names. (line 55) * MSU file archive suffix: Archive file names. (line 55) * mtp method: Quick Start Guide. (line 95) * mtp method <1>: GVFS-based methods. (line 47) * mtree file archive suffix: Archive file names. (line 57) * multi-hop: Multi-hops. (line 6) * multi-hop, ad-hoc: Ad-hoc multi-hops. (line 6) * nc method: External methods. (line 91) * nc unix command: Remote shell setup. (line 228) * nextcloud: Quick Start Guide. (line 105) * nextcloud <1>: GVFS-based methods. (line 64) * nextcloud method: Quick Start Guide. (line 105) * nextcloud method <1>: GVFS-based methods. (line 64) * obtaining TRAMP: Obtaining TRAMP. (line 6) * odb file archive suffix: Archive file names. (line 60) * odf file archive suffix: Archive file names. (line 60) * odg file archive suffix: Archive file names. (line 60) * odp file archive suffix: Archive file names. (line 60) * ods file archive suffix: Archive file names. (line 60) * odt file archive suffix: Archive file names. (line 60) * overview: Overview. (line 6) * passwords: Password handling. (line 6) * pax file archive suffix: Archive file names. (line 62) * perldb: Remote processes. (line 224) * plink (with pscp method): External methods. (line 62) * plink (with psftp method): External methods. (line 62) * plink method: Quick Start Guide. (line 43) * plink method <1>: Quick Start Guide. (line 68) * plink method <2>: Inline methods. (line 114) * plinkx method: Inline methods. (line 126) * powershell: Remote processes. (line 255) * proxy hosts: Multi-hops. (line 6) * proxy hosts, ad-hoc: Ad-hoc multi-hops. (line 6) * proxy hosts, http tunnel: Firewalls. (line 6) * pscp method: External methods. (line 62) * psftp method: External methods. (line 62) * putty (with pscp method): External methods. (line 62) * putty (with psftp method): External methods. (line 62) * quick start guide: Quick Start Guide. (line 6) * rar file archive suffix: Archive file names. (line 64) * rclone method: Quick Start Guide. (line 116) * rclone method <1>: FUSE-based methods. (line 14) * rclone setup: FUSE setup. (line 23) * rcp method: External methods. (line 17) * recompile: Remote processes. (line 6) * remote shell setup: Remote shell setup. (line 45) * rpm file archive suffix: Archive file names. (line 66) * rsh (with rcp method): External methods. (line 17) * rsh method: Inline methods. (line 33) * rsync method: External methods. (line 37) * save remote files: Renaming remote files. (line 6) * scp method: External methods. (line 25) * scpx method: External methods. (line 48) * scpx method with cygwin: Windows setup hints. (line 21) * selecting config files: Customizing Completion. (line 6) * separate syntax: Change file name syntax. (line 21) * sftp method: Quick Start Guide. (line 95) * sftp method <1>: GVFS-based methods. (line 72) * sg method: Quick Start Guide. (line 55) * sg method <1>: Inline methods. (line 77) * shar file archive suffix: Archive file names. (line 68) * shell: Remote processes. (line 127) * shell init files: Remote shell setup. (line 45) * shell-command: Remote processes. (line 161) * simplified syntax: Change file name syntax. (line 14) * smb method: Quick Start Guide. (line 87) * smb method <1>: External methods. (line 124) * smbclient: Quick Start Guide. (line 87) * smbclient <1>: External methods. (line 124) * ssh (with rsync method): External methods. (line 37) * ssh (with scp method): External methods. (line 25) * ssh (with scpx method): External methods. (line 48) * ssh method: Quick Start Guide. (line 43) * ssh method <1>: Quick Start Guide. (line 68) * ssh method <2>: Inline methods. (line 40) * sshfs method: Quick Start Guide. (line 116) * sshfs method <1>: FUSE-based methods. (line 45) * sshfs setup: FUSE setup. (line 38) * sshx method: Inline methods. (line 85) * sshx method with cygwin: Windows setup hints. (line 8) * SSH_AUTH_SOCK and emacs on ms windows: Windows setup hints. (line 29) * su method: Quick Start Guide. (line 55) * su method <1>: Quick Start Guide. (line 68) * su method <2>: Inline methods. (line 55) * sudo method: Quick Start Guide. (line 55) * sudo method <1>: Quick Start Guide. (line 68) * sudo method <2>: Inline methods. (line 62) * sudoedit method: Quick Start Guide. (line 78) * sudoedit method <1>: External methods. (line 98) * tar file archive suffix: Archive file names. (line 71) * tbz file archive suffix: Archive file names. (line 71) * telnet (with nc method): External methods. (line 91) * telnet method: Inline methods. (line 50) * tgz file archive suffix: Archive file names. (line 71) * tlz file archive suffix: Archive file names. (line 71) * TRAMP theme: Frequently Asked Questions. (line 296) * tset unix command: Remote shell setup. (line 136) * txz file archive suffix: Archive file names. (line 71) * type-ahead: Usage. (line 12) * tzst file archive suffix: Archive file names. (line 71) * unix command nc: Remote shell setup. (line 228) * unix command tset: Remote shell setup. (line 136) * using non-standard methods: Customizing Methods. (line 6) * using TRAMP: Usage. (line 6) * uu encoding: Inline methods. (line 16) * vagrant method: Customizing Methods. (line 48) * warc file archive suffix: Archive file names. (line 73) * winexe: Remote processes. (line 255) * xar file archive suffix: Archive file names. (line 75) * xpi file archive suffix: Archive file names. (line 77) * xps file archive suffix: Archive file names. (line 79) * zip file archive suffix: Archive file names. (line 81) * ZIP file archive suffix: Archive file names. (line 81) * zsh setup: Remote shell setup. (line 9)  Tag Table: Node: Top933 Node: Overview5594 Node: Obtaining TRAMP10950 Node: Quick Start Guide13408 Ref: Quick Start Guide File name syntax14189 Ref: Quick Start Guide ssh and plink methods15285 Ref: Quick Start Guide su, sudo, doas and sg methods15832 Ref: Quick Start Guide Combining ssh, plink, su, sudo and doas methods16504 Ref: Quick Start Guide sudoedit method17069 Ref: Quick Start Guide smb method17479 Ref: Quick Start Guide GVFS-based methods17810 Ref: Quick Start Guide GNOME Online Accounts based methods18256 Ref: Quick Start Guide FUSE-based methods18798 Ref: Quick Start Guide Android19671 Node: Configuration19905 Node: Connection types22557 Node: Inline methods23974 Node: External methods29097 Node: GVFS-based methods38237 Node: FUSE-based methods42391 Node: Default Method45343 Node: Default User48360 Node: Default Host49889 Node: Multi-hops51021 Node: Firewalls55213 Node: Customizing Methods56682 Node: Customizing Completion59024 Node: Password handling62514 Ref: Using an authentication file62984 Ref: Caching passwords64829 Node: Connection caching65347 Node: Predefined connection information66277 Node: Remote programs71086 Node: Remote shell setup74018 Node: FUSE setup84481 Ref: Setup of rclone method85264 Ref: Setup of sshfs method85847 Node: Android shell setup86305 Node: Auto-save and Backup88699 Node: Keeping files encrypted92052 Node: Windows setup hints96714 Node: Usage98337 Node: File name syntax99690 Node: Change file name syntax101697 Node: File name completion103128 Node: Ad-hoc multi-hops105710 Node: Remote processes107775 Ref: Running a debugger on a remote host117527 Ref: Improving performance of asynchronous remote processes119497 Node: Cleanup remote connections121823 Node: Renaming remote files123524 Node: Archive file names127755 Node: Bug Reports132269 Node: Frequently Asked Questions135010 Node: Files directories and localnames162166 Node: Localname deconstruction162602 Node: External packages163255 Node: Traces and Profiles165879 Node: GNU Free Documentation License167964 Node: Function Index193337 Node: Variable Index196639 Node: Concept Index206534  End Tag Table  Local Variables: coding: utf-8 End: