]> TRAMP User Manual Copyright © 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007Free 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.2 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” in the Emacs manual. (a) The FSF's Back-Cover Text is: “You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development.” This document is part of a collection distributed under the GNU Free Documentation License. If you want to distribute this document separately from the collection, you can do so by adding a copy of the license to the document, as described in section 6 of the license. tramp version 2.0.55 User Manual This file documents tramp version 2.0.55, a remote file editing package for GNU 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 http://www.gnu.org/software/tramp/. There is a mailing list for tramp, available at , and archived at the tramp Mail Archive. Copyright © 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 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.2 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” in the Emacs manual. (a) The FSF's Back-Cover Text is: “You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development.” This document is part of a collection distributed under the GNU Free Documentation License. If you want to distribute this document separately from the collection, you can do so by adding a copy of the license to the document, as described in section 6 of the license. An overview of tramp overview After the installation of tramp into your GNU Emacs, you will be able to access files on remote machines as though they were local. Access to the remote file system for editing files, version control, and dired are transparently enabled. Your access to the remote machine can be with the rsh, rlogin, telnet programs or with any similar connection method. This connection must pass ASCII successfully to be usable but need not be 8-bit clean. The package provides support for ssh connections out of the box, one of the more common uses of the package. This allows relatively secure access to machines, especially if ftp access is disabled. The majority of activity carried out by tramp requires only that the remote login is possible and is carried out at the terminal. In order to access remote files tramp needs to transfer their content to the local machine temporarily. tramp can transfer files between the machines in a variety of ways. The details are easy to select, depending on your needs and the machines in question. The fastest transfer methods (for large files) rely on a remote file transfer package such as rcp, scp or rsync. If the remote copy methods are not suitable for you, tramp also supports the use of encoded transfers directly through the shell. This requires that the mimencode or uuencode tools are available on the remote machine. These methods are generally faster for small files. Within these limitations, tramp is quite powerful. It is worth noting that, as of the time of writing, it is far from a polished end-user product. For a while yet you should expect to run into rough edges and problems with the code now and then. It is finished enough that the developers use it for day to day work but the installation and setup can be a little difficult to master, as can the terminology. tramp is still under active development and any problems you encounter, trivial or major, should be reported to the tramp developers. See . Behind the scenes behind the scenes details of operation how it works This section tries to explain what goes on behind the scenes when you access a remote file through tramp. Suppose you type C-x C-f and enter part of an tramp file name, then hit TAB for completion. Suppose further that this is the first time that tramp is invoked for the host in question. Here's what happens: tramp discovers that it needs a connection to the host. So itinvokes ‘telnet host’ or ‘rsh host -luser’ or a similar tool to connect to the remote host.Communication with this process happens through anGNU Emacs buffer, that is, the output from the remote endgoes into a buffer. The remote host may prompt for a login name (for telnet).The login name is given in the file name, so tramp sends thelogin name and a newline. The remote host may prompt for a password or pass phrase (forrsh or for telnet after sending the login name).tramp displays the prompt in the minibuffer, asking you for thepassword or pass phrase.You enter the password or pass phrase. tramp sends it to the remotehost, followed by a newline. tramp now waits for the shell prompt or for a message that the loginfailed.If tramp sees neither of them after a certain period of time (a minute,say), then it issues an error message saying that it couldn't find theremote shell prompt and shows you what the remote host has sent.If tramp sees a ‘login failed’ message, it tells you so,aborts the login attempt and allows you to try again. Suppose that the login was successful and tramp sees the shell promptfrom the remote host. Now tramp invokes /bin/sh becauseBourne shells and C shells have different commandsyntaxes. Invoking /bin/sh will fail if your loginshell doesn't recognize ‘exec /bin/sh’ as a valid command.Maybe you use the Scheme shell scsh After the Bourne shell has come up, tramp sends a few commands toensure a good working environment. It turns off echoing, it sets theshell prompt, and a few other things. Now the remote shell is up and it good working order. Remember, whatwas supposed to happen is that tramp tries to find out what files existon the remote host so that it can do filename completion.So, tramp basically issues cd and ls commands andalso sometimes echo with globbing. Another command that isoften used is test to find out whether a file is writable or adirectory or the like. The output of each command is parsed for thenecessary operation. Suppose you are finished with filename completion, have entered C-xC-f, a full file name and hit RET. Now comes the time totransfer the file contents from the remote host to the local host sothat you can edit them.See above for an explanation of how tramp transfers the file contents.For inline transfers, tramp issues a command like ‘mimencode -b/path/to/remote/file’, waits until the output has accumulated in thebuffer that's used for communication, then decodes that output toproduce the file contents.For out-of-band transfers, tramp issues a command like the following: rcp user@host:/path/to/remote/file /tmp/tramp.4711 It then reads the local temporary file /tmp/tramp.4711 into abuffer and deletes the temporary file. You now edit the buffer contents, blithely unaware of what has happenedbehind the scenes. (Unless you have read this section, that is.) Whenyou are finished, you type C-x C-s to save the buffer. Again, tramp transfers the file contents to the remote host eitherinline or out-of-band. This is the reverse of what happens when readingthe file. I hope this has provided you with a basic overview of what happens behind the scenes when you open a file with tramp. Obtaining Tramp. obtaining Tramp tramp is freely available on the Internet and the latest release may be downloaded from ftp://ftp.gnu.org/gnu/tramp/. This release includes the full documentation and code for tramp, suitable for installation. But GNU Emacs (22 or later) includes tramp already, and there is a tramp package for XEmacs, as well. So maybe it is easier to just use those. But if you want the bleeding edge, read on…... For the especially brave, tramp is available from CVS. The CVS version is the latest version of the code and may contain incomplete features or new issues. Use these versions at your own risk. Instructions for obtaining the latest development version of tramp from CVS can be found by going to the Savannah project page at the following URL and then clicking on the CVS link in the navigation bar at the top. http://savannah.gnu.org/projects/tramp/ Or follow the example session below: ] cd ~/emacs ] export CVS_RSH="ssh" ] cvs -z3 -d:ext:anoncvs@savannah.gnu.org:/cvsroot/tramp co tramp You should now have a directory ~/emacs/tramp containing the latest version of tramp. You can fetch the latest updates from the repository by issuing the command: ] cd ~/emacs/tramp ] export CVS_RSH="ssh" ] cvs update -d Once you've got updated files from the CVS repository, you need to run autoconf in order to get an up-to-date configure script: ] cd ~/emacs/tramp ] autoconf History of tramp history development history Development was started end of November 1998. The package was called rssh.el, back then. It only provided one method to access a file, using ssh to log in to a remote host and using scp to transfer the file contents. After a while, the name was changed to rcp.el, and now it's tramp. Along the way, many more methods for getting a remote shell and for transferring the file contents were added. Support for VC was added. The most recent addition of major features were the multi-hop methods added in April 2000 and the unification of tramp and Ange-FTP filenames in July 2002. Configuring tramp for use configuration default configuration tramp is (normally) fully functional when it is initially installed. It is initially configured to use the scp program to connect to the remote host. So in the easiest case, you just type C-x C-f and then enter the filename /user@machine:/path/to.file. On some hosts, there are problems with opening a connection. These are related to the behavior of the remote shell. See See , for details on this. If you do not wish to use these commands to connect to the remote host, you should change the default connection and transfer method that tramp uses. There are several different methods that tramp can use to connect to remote machines and transfer files (see ). If you don't know which method is right for you, see See . Types of connections made to remote machines. connection types, overview There are two basic types of transfer methods, each with its own advantages and limitations. Both types of connection make use of a remote shell access program such as rsh, ssh or telnet to connect to the remote machine. This connection is used to perform many of the operations that tramp requires to make the remote file system transparently accessible from the local machine. It is only when visiting files that the methods differ. inline methods external transfer methods external methods out-of-band methods methods, inline methods, external transfer methods, out-of-band Loading or saving a remote file requires that the content of the file be transfered between the two machines. The content of the file can be transfered over the same connection used to log in to the remote machine or the file can be transfered through another connection using a remote copy program such as rcp, scp or rsync. The former are called inline methods, the latter are called out-of-band methods or external transfer methods (external methods for short). The performance of the external transfer 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 transfer 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 transfer methods should be configured such a way that they don't require a password (with ssh-agent, or such alike). If it isn't possible, you should consider , otherwise you will be prompted for a password every copy action. multi-hop methods methods, multi-hop A variant of the inline methods are the multi-hop methods. These methods allow you to connect a remote host using a number `hops', each of which connects to a different host. This is useful if you are in a secured network where you need to go through a bastion host to connect to the outside world. Inline methods inline methods methods, inline The inline methods in tramp are quite powerful and can work in situations where you cannot use an external transfer program to connect. Inline methods are the only methods that work when connecting to the remote machine via telnet. (There are also strange inline methods which allow you to transfer files between user identities rather than hosts, see below.) These methods depend on the existence of a suitable encoding and decoding command on remote machine. Locally, tramp may be able to use features of GNU Emacs to decode and encode the files or it may require access to external commands to perform that task. uuencode mimencode base-64 encoding tramp checks the availability and usability of commands like mimencode (part of the metamail package) or uuencode on the remote host. The first reliable command will be used. The search path can be customized, see . If both commands aren't available on the remote host, tramp transfers a small piece of Perl code to the remote host, and tries to apply it for encoding and decoding. method rsh rsh methodConnect to the remote host with rsh. Due to the unsecureconnection it is recommended for very local host topology only.On operating systems which provide the command remsh insteadof rsh, you can use the method . This is truefor HP-UX or Cray UNICOS, for example. method ssh ssh methodConnect to the remote host with ssh. This is identical tothe previous option except that the ssh package is used,making the connection more secure.There are also two variants, and , thatcall ‘ssh -1’ and ‘ssh -2’, respectively. This way, you canexplicitly select whether you want to use the SSH protocol version 1or 2 to connect to the remote host. (You can also specify in~/.ssh/config, the SSH configuration file, which protocolshould be used, and use the regular method.)Two other variants, and , use thessh1 and ssh2 commands explicitly. If you don'tknow what these are, you do not need these options.All the methods based on ssh have an additional kludgyfeature: you can specify a host name which looks like host#42(the real host name, then a hash sign, then a port number). Thismeans to connect to the given host but to also pass -p 42 asarguments to the ssh command. method telnet telnet methodConnect to the remote host with telnet. This is as unsecureas the method. method su su methodThis method does not connect to a remote host at all, rather it usesthe su program to allow you to edit files as another user. method sudo sudo methodThis is similar to the method, but it uses sudorather than su to become a different user.Note that sudo must be configured to allow you to start ashell as the user. It would be nice if it was sufficient ifls and mimencode were allowed, but that is noteasy to implement, so I haven't got around to it, yet. method sshx sshx methodAs you would expect, this is similar to , only a littledifferent. Whereas opens a normal interactive shell onthe remote host, this option uses ‘ssh -t -t host -luser /bin/sh’ to open a connection. This is useful for userswhere the normal login shell is set up to ask them a number ofquestions when logging in. This procedure avoids these questions, andjust gives tramp a more-or-less `standard' login shell to workwith.Note that this procedure does not eliminate questions asked byssh itself. For example, ssh might ask “Are yousure you want to continue connecting?” if the host key of the remotehost is not known. tramp does not know how to deal with such aquestion (yet), therefore you will need to make sure that you can login without such questions.This is also useful for Windows users where ssh, wheninvoked from an GNU Emacs buffer, tells them that it is notallocating a pseudo tty. When this happens, the login shell is wontto not print any shell prompt, which confuses tramp mightily.For reasons unknown, some Windows ports for ssh require thedoubled ‘-t’ option.This supports the ‘-p’ kludge. method krlogin km krlogin Kerberos (with krlogin method)This method is also similar to . It only uses thekrlogin -x command to log in to the remote host. method plink plink methodThis method is mostly interesting for Windows users using the PuTTYimplementation of SSH. It uses ‘plink -ssh’ to log in to theremote host.Additionally, the method is provided, which calls‘plink -1 -ssh’ in order to use SSH protocol version 1explicitly.CCC: Do we have to connect to the remote host once from the commandline to accept the SSH key? Maybe this can be made automatic?CCC: Does plink support the ‘-p’ option? tramp willsupport that, anyway. External transfer methods methods, external transfer methods, out-of-band external transfer methods out-of-band methods The external transfer methods operate through multiple channels, using the remote shell connection for many actions while delegating file transfers to an external transfer utility. This saves the overhead of encoding and decoding that multiplexing the transfer through the one connection has with the inline methods. If you want to use an external transfer method you should be able to execute the transfer utility to copy files to and from the remote machine without any interaction. ssh-agent This means that you will need to use ssh-agent if you use the scp program for transfers, or maybe your version of scp accepts a password on the command line.PuTTY's pscp allows you to specify the password on the command line. If you use rsync via ssh then the same rule must apply to that connection. If you cannot get an external method to run without asking for a password you should consider . rsh and rcp method rcp rcp method rcp (with rcp method) rsh (with rcp method)This method uses the rsh and rcp commands to connectto the remote machine and transfer files. This is probably the fastestconnection method available.The alternative method uses the remsh andrcp commands. It should be applied on machines whereremsh is used instead of rsh. ssh and scp method scp scp method scp (with scp method) ssh (with scp method)Using ssh to connect to the remote host and scp totransfer files between the machines is the best method for securelyconnecting to a remote machine and accessing files.The performance of this option is also quite good. It may be slower thanthe inline methods when you often open and close small files however.The cost of the cryptographic handshake at the start of an scpsession can begin to absorb the advantage that the lack of encoding anddecoding presents.There are also two variants, and , thatcall ‘ssh -1’ and ‘ssh -2’, respectively. This way, you canexplicitly select whether you want to use the SSH protocol version 1or 2 to connect to the remote host. (You can also specify in~/.ssh/config, the SSH configuration file, which protocolshould be used, and use the regular method.)Two other variants, and , use thessh1 and ssh2 commands explicitly. If you don'tknow what these are, you do not need these options.All the ssh based methods support the kludgy ‘-p’feature where you can specify a port number to connect to in the hostname. For example, the host name host#42 tells tramp tospecify ‘-p 42’ in the argument list for ssh. ssh and rsync method rsync rsync method rsync (with rsync method) ssh (with rsync method)Using the ssh command to connect securely to the remotemachine and the rsync command to transfer files is almostidentical to the method.While rsync performs much better than scp whentransferring files that exist on both hosts, this advantage is lost ifthe file exists only on one side of the connection.The rsync based method may be considerably faster than thercp based methods when writing to the remote system. Readingfiles to the local machine is no faster than with a direct copy.This method supports the ‘-p’ hack. ssh and scp method scpx scpx method scp (with scpx method) ssh (with scpx method)As you would expect, this is similar to , only a littledifferent. Whereas opens a normal interactive shell onthe remote host, this option uses ‘ssh -t -t host -luser /bin/sh’ to open a connection. This is useful for userswhere the normal login shell is set up to ask them a number ofquestions when logging in. This procedure avoids these questions, andjust gives tramp a more-or-less `standard' login shell to workwith.This is also useful for Windows users where ssh, wheninvoked from an GNU Emacs buffer, tells them that it is notallocating a pseudo tty. When this happens, the login shell is wontto not print any shell prompt, which confuses tramp mightily.This method supports the ‘-p’ hack. ssh and scp method scpx scpx method scp (with scpx method) ssh (with scpx method)Newer versions of (for example OpenSSH 4) offer an option. This allows to reuse an existing channel, which increases performance.Before you use this method, you shall check whether your implementation does support this option. Try from the command line ssh localhost -o ControlMaster=yes This method supports the ‘-p’ hack. plink and pscp method pscp pscp method pscp (with pscp method) plink (with pscp method) PuTTY (with pscp method)This method is similar to , but it uses theplink command to connect to the remote host, and it usespscp for transferring the files. These programs are partof PuTTY, an SSH implementation for Windows.CCC: Does plink support the ‘-p’ hack? fsh and fcp method fcp fcp method fsh (with fcp method) fcp (with fcp method)This method is similar to , but it uses the fshcommand to connect to the remote host, and it uses fcp fortransferring the files. fsh/fcp are a front-end forssh which allow for reusing the same ssh sessionfor submitting several commands. This avoids the startup overhead ofscp (which has to establish a secure connection whenever itis called). Note, however, that you can also use one of the inlinemethods to achieve a similar effect.This method uses the command ‘fsh host -l user/bin/sh -i’ to establish the connection, it does not work to just sayfsh host -l user. method fsh fsh methodThere is no inline method using fsh as the multiplexingprovided by the program is not very useful in our context. trampopens just one connection to the remote host and then keeps it open,anyway. method ftp ftp methodThis is not a native tramp method. Instead of, it forwards allrequests to Ange-FTP. smbclient method smb smb methodThis is another not natural tramp method. It uses thesmbclient command on different Unices in order to connect toan SMB server. An SMB server might be a Samba (or CIFS) server onanother UNIX host or, more interesting, a host running MS Windows. Sofar, it is tested towards MS Windows NT, MS Windows 2000, and MSWindows XP.The first directory in the localname must be a share name on the remotehost. Remember, that the $ character in which default sharesusually end, must be written $$ due to environment variablesubstitution in file names. If no share name is given (i.e. remotedirectory /), all available shares are listed.Since authorization is done on share level, you will be promptedalways for a password if you access another share on the same host.This can be suppressed by .MS Windows uses for authorization both a user name and a domain name.Because of this, the tramp syntax has been extended: you canspecify a user name which looks like user%domain (the real username, then a percent sign, then the domain name). So, to connect tothe machine melancholia as user daniel of the domainBIZARRE, and edit .emacs in the home directory (sharedaniel$) I would specify the filename/smb:daniel%BIZARRE@melancholia:/daniel$$/.emacs.The domain name as well as the user name are optional. If no username is specified at all, the anonymous user (without passwordprompting) is assumed. This is different from all other trampmethods, where in such a case the local user name is taken.The method supports the ‘-p’ hack.Please note: If GNU Emacs runs locally under MSWindows, this method isn't available. Instead of, you can use UNCfile names like //melancholia/daniel$$/.emacs. The onlydisadvantage is that there's no possibility to specify another username. Connecting to a remote host using multiple hops multi-hop methods methods, multi-hop Sometimes, the methods described before are not sufficient. Sometimes, it is not possible to connect to a remote host using a simple command. For example, if you are in a secured network, you might have to log in to a `bastion host' first before you can connect to the outside world. Of course, the target host may also require a bastion host. The format of multi-hop filenames is slightly different than the format of normal tramp methods. method multi multi method A multi-hop file name specifies a method, a number of hops, and a localname (path name on the remote system). The method name is always . Each hop consists of a hop method specification, a user name and a host name. The hop method can be an inline method only. The following hop methods are (currently) available: hop method telnet telnet hop methodUses the well-known telnet program to connect to the host.Whereas user name and host name are supplied in the file name, theuser is queried for the password. hop method rsh rsh hop methodThis uses rsh to connect to the host. You do not need toenter a password unless rsh explicitly asks for it.The variant uses the remsh command. Itshould be applied on machines where remsh is used instead ofrsh. hop method ssh ssh hop methodThis uses ssh to connect to the host. You might have to entera password or a pass phrase. hop method su su hop methodThis method does not actually contact a different host, but it allowsyou to become a different user on the host you're currently on. Thismight be useful if you want to edit files as root, but the remote hostdoes not allow remote root logins. In this case you can use, or to connect to theremote host as a non-root user, then use an hop to becomeroot. But need not be the last hop in a sequence, you couldalso use it somewhere in the middle, if the need arises.Even though you must specify both user and host with an hop, the host name is ignored and only the user name isused. hop method sudo sudo hop methodThis is similar to the hop, except that it usessudo rather than su to become a different user. Some people might wish to use port forwarding with ssh or maybe they have to use a nonstandard port. This can be accomplished by putting a stanza in ~/.ssh/config for the account which specifies a different port number for a certain host name. But it can also be accomplished within tramp, by adding a multi-hop method. For example:(add-to-list 'tramp-multi-connection-function-alist '("sshf" tramp-multi-connect-rlogin "ssh %h -l %u -p 4400%n")) Now you can use an hop which connects to port 4400 instead of the standard port. Selecting a default method default method tramp-default-method When you select an appropriate transfer method for your typical usage you should set the variable tramp-default-method to reflect that choice. This variable controls which method will be used when a method is not specified in the tramp file name. For example:(setq tramp-default-method "ssh") tramp-default-method-alist You can also specify different methods for certain user/host combinations, via the variable tramp-default-method-alist. For example, the following two lines specify to use the method for all user names matching ‘john’ and the method for all host names matching ‘lily’. The third line specifies to use the method for the user ‘root’ on the machine ‘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")) See the documentation for the variable tramp-default-method-alist for more details. External transfer methods are normally preferable to inline transfer methods, giving better performance. See . See . See . Another consideration with the selection of transfer methods is the environment you will use them in and, especially when used over the Internet, the security implications of your preferred method. The and methods send your password as plain text as you log in to the remote machine, as well as transferring the files in such a way that the content can easily be read from other machines. If you need to connect to remote systems that are accessible from the Internet, you should give serious thought to using based methods to connect. These provide a much higher level of security, making it a non-trivial exercise for someone to obtain your password or read the content of the files you are editing. Which method is the right one for me? choosing the right method Given all of the above, you are probably thinking that this is all fine and good, but it's not helping you to choose a method! Right you are. As a developer, we don't want to boss our users around but give them maximum freedom instead. However, the reality is that some users would like to have some guidance, so here I'll try to give you this guidance without bossing you around. You tell me whether it works … My suggestion is to use an inline method. For large files, out-of-band methods might be more efficient, but I guess that most people will want to edit mostly small files. I guess that these days, most people can access a remote machine by using ssh. So I suggest that you use the method. So, type C-x C-f /ssh:root@otherhost:/etc/motd RET to edit the /etc/motd file on the other host. If you can't use to log in to the remote host, then select a method that uses a program that works. For instance, Windows users might like the method which uses the PuTTY implementation of ssh. Or you use Kerberos and thus like . For the special case of editing files on the local host as another user, see the or methods. They offer shortened syntax for the ‘root’ account, like /su::/etc/motd. People who edit large files may want to consider instead of , or instead of . These out-of-band methods are faster than inline methods for large files. Note, however, that out-of-band methods suffer from some limitations. Please try first whether you really get a noticeable speed advantage from using an out-of-band method! Maybe even for large files, inline methods are fast enough. Using Non-Standard Methods customizing methods using non-standard methods create your own methods There is a variable tramp-methods which you can change if the predefined methods don't seem right. For the time being, I'll refer you to the Lisp documentation of that variable, accessible with C-h v tramp-methods RET. Selecting config files for user/host name completion customizing completion selecting config files tramp-completion-function-alist The variable tramp-completion-function-alist is intended to customize which files are taken into account for user and host name completion (see ). For every method, it keeps a set of configuration files, accompanied by a Lisp function able to parse that file. Entries in tramp-completion-function-alist have the form (method pair1 pair2 ...). Each pair is composed of (function file). function is responsible to extract user names and host names from file for completion. There are two functions which access this variable: tramp-get-completion-function — 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")) tramp-set-completion-function — Function: tramp-set-completion-function method function-list This function sets function-list as list of completion functionsfor 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 tramp-parse-rhostsThis function parses files which are syntactical equivalent to~/.rhosts. It returns both host names and user names, ifspecified. tramp-parse-shosts tramp-parse-shostsThis function parses files which are syntactical equivalent to~/.ssh/known_hosts. Since there are no user names specifiedin such files, it can return host names only. tramp-parse-sconfig tramp-parse-shostsThis function returns the host nicknames defined by Host entriesin ~/.ssh/config style files. tramp-parse-shostkeys tramp-parse-shostkeysSSH2 parsing of directories /etc/ssh2/hostkeys/* and~/ssh2/hostkeys/*. Hosts are coded in file nameshostkey_portnumber_host-name.pub. User namesare always nil. tramp-parse-sknownhosts tramp-parse-shostkeysAnother SSH2 style parsing of directories like/etc/ssh2/knownhosts/* and ~/ssh2/knownhosts/*. Thiscase, hosts names are coded in file nameshost-name.algorithm.pub. User names are always nil. tramp-parse-hosts tramp-parse-hostsA function dedicated to /etc/hosts style files. It returnshost names only. tramp-parse-passwd tramp-parse-passwdA function which parses /etc/passwd like files. Obviously, itcan return user names only. tramp-parse-netrc tramp-parse-netrcFinally, a function which parses ~/.netrc like files. If you want to keep your own data in a file, with your own structure, you might provide such a function as well. This function must meet the following conventions: my-tramp-parse — Function: my-tramp-parse file file must be either a file name on your host, or nil. Thefunction must return a list of (user host), which aretaken as candidates for user and host name completion.Example: (my-tramp-parse "~/.my-tramp-hosts") => ((nil "toto") ("daniel" "melancholia")) Reusing passwords for several connections. passwords Sometimes it is necessary to connect to the same remote host several times. Reentering passwords again and again would be annoying, when the chosen method does not support access without password prompt through own configuration. By default, tramp caches the passwords entered by you. They will be reused next time if a connection needs them for the same user name and host name, independently of the connection method. password-cache-expiry Passwords are not saved permanently, that means the password caching is limited to the lifetime of your GNU Emacs session. You can influence the lifetime of password caching by customizing the variable password-cache-expiry. The value is the number of seconds how long passwords are cached. Setting it to nil disables the expiration. tramp-clear-passwd A password is removed from the cache if a connection isn't established successfully. You can remove a password from the cache also by executing M-x tramp-clear-passwd in a buffer containing a related remote file or directory. password-cache If you don't like this feature for security reasons, password caching can be disabled totally by customizing the variable password-cache (setting it to nil). Implementation Note: password caching is based on the package password.el in No Gnus. For the time being, it is activated only when this package is seen in the load-path while loading tramp. It will be activated mandatory once No Gnus has found its way into GNU Emacs. How tramp finds and uses programs on the remote machine. tramp depends on a number of programs on the remote host in order to function, including ls, test, find and cat. In addition to these required tools, there are various tools that may be required based on the connection method. See and for details on these. Certain other tools, such as perl (or perl5) and grep will be used if they can be found. When they are available, they are used to improve the performance and accuracy of remote file access. tramp-remote-path When tramp connects to the remote machine, it searches for the programs that it can use. The variable tramp-remote-path controls the directories searched on the remote machine. By default, this is set to a reasonable set of defaults for most machines. It is possible, however, that your local (or remote ;) system administrator has put the tools you want in some obscure local directory. In this case, you can still use them with tramp. You simply need to add code to your .emacs to add the directory to the remote path. This will then be searched by tramp when you connect and the software found. To add a directory to the remote search path, you could use code such as: ;; We load tramp to define the variable. (require 'tramp) ;; We have perl in "/usr/local/perl/bin" (add-to-list 'tramp-remote-path "/usr/local/perl/bin") Remote shell setup hints remote shell setup .profile file .login file shell init files As explained in the section, tramp connects to the remote host and talks to the shell it finds there. Of course, when you log in, the shell executes its init files. Suppose your init file requires you to enter the birth date of your mother; clearly tramp does not know this and hence fails to log you in to that host. There are different possible strategies for pursuing this problem. One strategy is to enable tramp to deal with all possible situations. This is a losing battle, since it is not possible to deal with all situations. The other strategy is to require you to set up the remote host such that it behaves like tramp expects. This might be inconvenient because you have to invest a lot of effort into shell setup before you can begin to use tramp. The package, therefore, pursues a combined approach. It tries to figure out some of the more common setups, and only requires you to avoid really exotic stuff. For example, it looks through a list of directories to find some programs on the remote host. And also, it knows that it is not obvious how to check whether a file exists, and therefore it tries different possibilities. (On some hosts and shells, the command test -e does the trick, on some hosts the shell builtin doesn't work but the program /usr/bin/test -e or /bin/test -e works. And on still other hosts, ls -d is the right way to do this.) Below you find a discussion of a few things that tramp does not deal with, and that you therefore have to set up correctly. shell-prompt-pattern shell-prompt-patternAfter logging in to the remote host, tramp has to wait for the remoteshell startup to finish before it can send commands to the remoteshell. The strategy here is to wait for the shell prompt. In order torecognize the shell prompt, the variable shell-prompt-pattern hasto be set correctly to recognize the shell prompt on the remote host.Note that tramp requires the match for shell-prompt-patternto be at the end of the buffer. Many people have something like thefollowing as the value for the variable: "^[^>$][>$] *". Nowsuppose your shell prompt is a <b> c $ . In this case,tramp recognizes the > character as the end of the prompt,but it is not at the end of the buffer. tramp-shell-prompt-pattern tramp-shell-prompt-patternThis regular expression is used by tramp in the same way asshell-prompt-pattern, to match prompts from the remote shell.This second variable exists because the prompt from the remote shellmight be different from the prompt from a local shell — after all,the whole point of tramp is to log in to remote hosts as adifferent user. The default value oftramp-shell-prompt-pattern is the same as the default value ofshell-prompt-pattern, which is reported to work well in manycircumstances. tset and other questions Unix command tset tset Unix commandSome people invoke the tset program from their shell startupscripts which asks the user about the terminal type of the shell.Maybe some shells ask other questions when they are started. trampdoes not know how to answer these questions. There are two approachesfor dealing with this problem. One approach is to take care that theshell does not ask any questions when invoked from tramp. You cando this by checking the TERM environment variable, it will beset to dumb when connecting. tramp-terminal-typeThe variable tramp-terminal-type can be used to change this valueto dumb.The other approach is to teach tramp about these questions. Seethe variables tramp-actions-before-shell andtramp-multi-actions (for multi-hop connections). Environment variables named like users in .profile If you have a user named frumple and set the variable FRUMPLE inyour shell environment, then this might cause trouble. Maybe renamethe variable to FRUMPLE_DIR or the like.This weird effect was actually reported by a tramp user! Non-Bourne commands in .profile After logging in to the remote host, tramp issues the commandexec /bin/sh. (Actually, the command is slightlydifferent.) When /bin/sh is executed, it reads some initfiles, such as ~/.shrc or ~/.profile.Now, some people have a login shell which is not /bin/sh but aBourne-ish shell such as bash or ksh. Some of these people might puttheir shell setup into the files ~/.shrc or ~/.profile.This way, it is possible for non-Bourne constructs to end up in thosefiles. Then, exec /bin/sh might cause the Bourne shell tobarf on those constructs.As an example, imagine somebody putting export FOO=bar intothe file ~/.profile. The standard Bourne shell does notunderstand this syntax and will emit a syntax error when it reachesthis line.Another example is the tilde (~) character, say when adding~/bin to $PATH. Many Bourne shells will not expand thischaracter, and since there is usually no directory whose name consistsof the single character tilde, strange things will happen.What can you do about this?Well, one possibility is to make sure that everything in ~/.shrcand ~/.profile on all remote hosts is Bourne-compatible. In theabove example, instead of export FOO=bar, you might useFOO=bar; export FOO instead.The other possibility is to put your non-Bourne shell setup into someother files. For example, bash reads the file ~/.bash_profileinstead of ~/.profile, if the former exists. So bashaficionados just rename their ~/.profile to~/.bash_profile on all remote hosts, and Bob's your uncle.The tramp developers would like to circumvent this problem, soif you have an idea about it, please tell us. However, we are afraidit is not that simple: before saying exec /bin/sh,tramp does not know which kind of shell it might be talkingto. It could be a Bourne-ish shell like ksh or bash, or it could be acsh derivative like tcsh, or it could be zsh, or even rc. If theshell is Bourne-ish already, then it might be prudent to omit theexec /bin/sh step. But how to find out if the shell isBourne-ish? Auto-save and Backup configuration auto-save backup backup-directory-alist Normally, GNU Emacs writes backup files to the same directory as the original files, but this behavior can be changed via the variable backup-directory-alist. In connection with tramp, this can have unexpected side effects. Suppose that you specify that all backups should go to the directory ~/.emacs.d/backups/, and then you edit the file /su:root@localhost:/etc/secretfile. The effect is that the backup file will be owned by you and not by root, thus possibly enabling others to see it even if they were not intended to see it. When backup-directory-alist is nil (the default), such problems do not occur. Therefore, it is useful to set special values for tramp files. For example, the following statement effectively `turns off' the effect of backup-directory-alist for tramp files:(add-to-list 'backup-directory-alist (cons tramp-file-name-regexp nil)) Another possibility is to use the tramp variable tramp-backup-directory-alist. This variable has the same meaning like backup-directory-alist. If a tramp file is backed up, and DIRECTORY is an absolute local file name, DIRECTORY is prepended with the tramp file name prefix of the file to be backed up. Example:(add-to-list 'backup-directory-alist (cons "." "~/.emacs.d/backups/"))(setq 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~ The same problem can happen with auto-saving files. Since GNU Emacs 21, the variable auto-save-file-name-transforms keeps information, on which directory an auto-saved file should go. By default, it is initialized for tramp files to the local temporary directory. On some versions of GNU Emacs, namely the version built for Debian GNU/Linux, the variable auto-save-file-name-transforms contains the directory where GNU Emacs was built. A workaround is to manually set the variable to a sane value. If auto-saved files should go into the same directory as the original files, auto-save-file-name-transforms should be set to nil. Another possibility is to set the variable tramp-auto-save-directory to a proper value. Issues with Cygwin ssh Cygwin, issues This section needs a lot of work! Please help. method sshx with Cygwin sshx method with Cygwin The recent Cygwin installation of ssh works only with a Cygwinized GNU Emacs. You can check it by typing M-x eshell, and starting ssh test.machine. The problem is evident if you see a message like this: Pseudo-terminal will not be allocated because stdin is not a terminal. Older ssh versions of Cygwin are told to cooperate with tramp selecting as the connection method. You can find information about setting up Cygwin in their FAQ at http://cygwin.com/faq/. method scpx with Cygwin scpx method with Cygwin If you wish to use the connection method, then you might have the problem that GNU Emacs calls scp with a Windows filename such as c:/foo. The Cygwin version of scp does not know about Windows filenames and interprets this as a remote filename on the host c. One possible workaround is to write a wrapper script for which converts the Windows filename to a Cygwinized filename. Cygwin and ssh-agent SSH_AUTH_SOCK and GNU Emacs on Windows If you want to use either based method on Windows, then you might encounter problems with ssh-agent. Using this program, you can avoid typing the pass-phrase every time you log in. However, if you start GNU Emacs from a desktop shortcut, then the environment variable SSH_AUTH_SOCK is not set and so GNU Emacs and thus tramp and thus ssh and scp started from tramp cannot communicate with ssh-agent. It works better to start GNU Emacs from the shell. If anyone knows how to start ssh-agent under Windows in such a way that desktop shortcuts can profit, please holler. I don't really know anything at all about Windows… Using tramp using tramp Once you have installed tramp it will operate fairly transparently. You will be able to access files on any remote machine that you can log in to as though they were local. Files are specified to tramp using a formalized syntax specifying the details of the system to connect to. This is similar to the syntax used by the Ange-FTP package. type-ahead Something that might happen which surprises you is that GNU Emacs remembers all your keystrokes, so if you see a password prompt from GNU Emacs, say, and hit RET twice instead of once, then the second keystroke will be processed by GNU Emacs after tramp has done its thing. Why, this type-ahead is normal behavior, you say. Right you are, but be aware that opening a remote file might take quite a while, maybe half a minute when a connection needs to be opened. Maybe after half a minute you have already forgotten that you hit that key! tramp filename conventions filename syntax filename examples To access the file localname on the remote machine machine you would specify the filename /machine:localname. This will connect to machine and transfer the file using the default method. See . Some examples of tramp filenames are shown below. /melancholia:.emacs Edit the file .emacs in your home directory on the machinemelancholia. /melancholia.danann.net:.emacs This edits the same file, using the fully qualified domain name ofthe machine. /melancholia:~/.emacs This also edits the same file — the ~ is expanded to yourhome directory on the remote machine, just like it is locally. /melancholia:~daniel/.emacs This edits the file .emacs in the home directory of the userdaniel on the machine melancholia. The ~<user>construct is expanded to the home directory of that user on the remotemachine. /melancholia:/etc/squid.conf This edits the file /etc/squid.conf on the machinemelancholia. Unless you specify a different name to use, tramp will use the current local user name as the remote user name to log in with. If you need to log in as a different user, you can specify the user name as part of the filename. To log in to the remote machine as a specific user, you use the syntax /user@machine:/path/to.file. That means that connecting to melancholia as daniel and editing .emacs in your home directory you would specify /daniel@melancholia:.emacs. It is also possible to specify other file transfer methods (see ) as part of the filename. This is done by putting the method before the user and host name, as in /method: (Note the trailing colon). The user, machine and file specification remain the same. So, to connect to the machine melancholia as daniel, using the method to transfer files, and edit .emacs in my home directory I would specify the filename /ssh:daniel@melancholia:.emacs. Multi-hop filename conventions filename syntax for multi-hop files multi-hop filename syntax The syntax of multi-hop file names is necessarily slightly different than the syntax of other tramp file names. Here's an example multi-hop file name: /multi:rsh:out@gate:telnet:kai@real.host:/path/to.file This is quite a mouthful. So let's go through it step by step. The file name consists of three parts. The parts are separated by colons The first part is /multi, the method specification. The second part is rsh:out@gate:telnet:kai@real.host and specifies the hops. The final part is /path/to.file and specifies the file name on the remote host. The first part and the final part should be clear. See , for a list of alternatives for the method specification. The second part can be subdivided again into components, so-called hops. In the above file name, there are two hops, rsh:out@gate and telnet:kai@real.host. Each hop can again be subdivided into (three) components, the hop method, the user name and the host name. The meaning of the second and third component should be clear, and the hop method says what program to use to perform that hop. The first hop, rsh:out@gate, says to use rsh to log in as user out to the host gate. Starting at that host, the second hop, telnet:kai@real.host, says to use telnet to log in as user kai to host real.host. See , for a list of possible hop method values. The variable tramp-multi-connection-function-alist contains the list of possible hop methods and information on how to execute them, should you want to add your own. Filename completion filename completion Filename completion works with tramp for completion of method names, of user names and of machine names (except multi-hop methods) as well as for completion of file names on remote machines. In order to enable this, Partial Completion mode must be set on. If you, for example, type C-x C-f /t TAB, tramp might give you as result the choice for telnet: tmp/ toto: telnet:’ is a possible completion for the respective method, ‘tmp/’ stands for the directory /tmp on your local machine, and ‘toto:’ might be a host tramp has detected in your ~/.ssh/known_hosts file (given you're using default method ). If you go on to type e TAB, the minibuffer is completed to ‘/telnet:’. Next TAB brings you all machine names tramp detects in your /etc/hosts file, let's say telnet:127.0.0.1: telnet:192.168.0.1: telnet:localhost: telnet:melancholia.danann.net: telnet:melancholia: Now you can choose the desired machine, and you can continue to complete file names on that machine. As filename completion needs to fetch the listing of files from the remote machine, this feature is sometimes fairly slow. As tramp does not yet cache the results of directory listing, there is no gain in performance the second time you complete filenames. If the configuration files (see ), which tramp uses for analysis of completion, offer user names, those user names will be taken into account as well. Dired dired tramp works transparently with dired, enabling you to use this powerful file management tool to manage files on any machine you have access to over the Internet. If you need to browse a directory tree, Dired is a better choice, at present, than filename completion. Dired has its own cache mechanism and will only fetch the directory listing once. Compile remote files compile recompile tramp provides commands for compilation of files on remote machines. In order to get them loaded, you need to require tramp-util.el:(require 'tramp-util) Afterwards, you can use the commands tramp-compile and tramp-recompile instead of compile and recompile, respectively; *note (emacs)Compilation::. This does not work for the and methods. The corresponding key bindings and menu entries calling these commands are redefined automatically for buffers associated with remote files. After finishing the compilation, you can use the usual commands like previous-error, next-error and first-error for navigation in the *Compilation* buffer. Reporting Bugs and Problems bug reports Bugs and problems with tramp are actively worked on by the development team. Feature requests and suggestions are also more than welcome. The tramp mailing list is a great place to get information on working with tramp, solving problems and general discussion and advice on topics relating to the package. It is moderated so non-subscribers can post but messages will be delayed, possibly up to 48 hours (or longer in case of holidays), until the moderator approves your message. The mailing list is at . Messages sent to this address go to all the subscribers. This is not the address to send subscription requests to. Subscribing to the list is performed via the tramp Mail Subscription Page. To report a bug in tramp, you should execute M-x tramp-bug. This will automatically generate a buffer with the details of your system and tramp version. When submitting a bug report, please try to describe in excruciating detail the steps required to reproduce the problem, the setup of the remote machine and any special conditions that exist. You should also check that your problem is not described already in See . If you can identify a minimal test case that reproduces the problem, include that with your bug report. This will make it much easier for the development team to analyze and correct the problem. Frequently Asked Questions frequently asked questions FAQ Where can I get the latest tramp?tramp is available under the URL below.ftp://ftp.gnu.org/gnu/tramp/There is also a Savannah project page.http://savannah.gnu.org/projects/tramp/ Which systems does it work on?The package has been used successfully on GNU Emacs 20, GNU Emacs 21and GNU Emacs 22, as well as XEmacs 21. XEmacs 20 is moreproblematic, see the notes in tramp.el. I don't think anybodyhas really tried it on GNU Emacs 19.The package was intended to work on Unix, and it really expects aUnix-like system on the remote end (except the method),but some people seemed to have some success getting it to work on MSWindows NT/2000/XP GNU Emacs.There is some informations on tramp on NT at the following URL;many thanks to Joe Stoy for providing the information:ftp://ftp.comlab.ox.ac.uk/tmp/Joe.Stoy/ tramp does not connect to the remote hostWhen tramp does not connect to the remote host, there are tworeasons heading the bug mailing list: Unknown characters in the prompttramp needs to recognize the prompt on the remote machineafter execution any command. This is not possible, when the promptcontains unknown characters like escape sequences for coloring. Thisshould be avoided on the remote side. See . forsetting the regular expression detecting the prompt.A special problem is the zsh, which uses left-hand side and right-handside prompts in parallel. Therefore, it is necessary to disable thezsh line editor on the remote host. You shall add to ~/.zshrcthe following command: [ $TERM = "dumb" ] && unsetopt zle. tramp doesn't transfer strings with more than 500 characterscorrectlyOn some few systems, the implementation of process-send-stringseems to be broken for longer strings. This case, you shouldcustomize the variable tramp-chunksize to 500. For adescription how to determine whether this is necessary see thedocumentation of tramp-chunksize. File name completion does not work with trampWhen you log in to the remote machine, do you see the output ofls in color? If so, this may be the cause of your problems.ls outputs ANSI escape sequences that your terminalemulator interprets to set the colors. These escape sequences willconfuse tramp however.In your .bashrc, .profile or equivalent on the remotemachine you probably have an alias configured that adds the option or .You should remove that alias and ensure that a new login does notdisplay the output of ls in color. If you still cannot usefilename completion, report a bug to the tramp developers. File name completion does not work in large directoriestramp uses globbing for some operations. (Globbing means to use theshell to expand wildcards such as `*.c'.) This might create longcommand lines, especially in directories with many files. Some shellschoke on long command lines, or don't cope well with the globbingitself.If you have a large directory on the remote end, you may wish to executea command like ‘ls -d * ..?* > /dev/null’ and see if it hangs.Note that you must first start the right shell, which might be/bin/sh, ksh or bash, depending on whichof those supports tilde expansion. How can I get notified when tramp file transfers are complete?The following snippet can be put in your ~/.emacs file. Itmakes GNU Emacs beep after reading from or writing to theremote host.(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-copy-beep-advice activate) " make tramp beep after copying a file." (interactive) (beep)) There's this ~/.sh_history file on the remote host which keepsgrowing and growing. What's that?Sometimes, tramp starts ksh on the remote host fortilde expansion. Maybe ksh saves the history by default.tramp tries to turn off saving the history, but maybe you haveto help. For example, you could put this in your .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 How can I disable tramp?Shame on you, why did you read until now?If you just want to have Ange-FTP as default remotefiles access package, you should apply the following code:(setq tramp-default-method "ftp")Unloading tramp can be achieved by applying M-xtramp-unload-tramp.This resets also the Ange-FTP plugins. The inner workings of remote version control Version Control Unlike Ange-FTP, tramp has full shell access to the remote machine. This makes it possible to provide version control for files accessed under tramp. The actual version control binaries must be installed on the remote machine, accessible in the directories specified in tramp-remote-path. This transparent integration with the version control systems is one of the most valuable features provided by tramp, but it is far from perfect. Work is ongoing to improve the transparency of the system. Determining if a file is under version control The VC package uses the existence of on-disk revision control master files to determine if a given file is under revision control. These file tests happen on the remote machine through the standard tramp mechanisms. Executing the version control commands on the remote machine There are no hooks provided by VC to allow intercepting of the version control command execution. The calls occur through the call-process mechanism, a function that is somewhat more efficient than the shell-command function but that does not provide hooks for remote execution of commands. To work around this, the functions vc-do-command and vc-simple-command have been advised to intercept requests for operations on files accessed via tramp. In the case of a remote file, the shell-command interface is used, with some wrapper code, to provide the same functionality on the remote machine as would be seen on the local machine. Detecting if the working file has changed As there is currently no way to get access to the mtime of a file on a remote machine in a portable way, the vc-workfile-unchanged-p function is advised to call an tramp specific function for remote files. The tramp-vc-workfile-unchanged-p function uses the functioning VC diff functionality to determine if any changes have occurred between the workfile and the version control master. This requires that a shell command be executed remotely, a process that is notably heavier-weight than the mtime comparison used for local files. Unfortunately, unless a portable solution to the issue is found, this will remain the cost of remote version control. Bringing the workfile out of the repository VC will, by default, check for remote files and refuse to act on them when checking out files from the repository. To work around this problem, the function vc-checkout knows about tramp files and allows version control to occur. Things related to Version Control that don't fit elsewhere Minor implementation details, &c. How VC determines who owns a workfile GNU Emacs provides the user-full-name function to return the login name of the current user as well as mapping from arbitrary user id values back to login names. The VC code uses this functionality to map from the uid of the owner of a workfile to the login name in some circumstances. This will not, for obvious reasons, work if the remote system has a different set of logins. As such, it is necessary to delegate to the remote machine the job of determining the login name associated with a uid. Unfortunately, with the profusion of distributed management systems such as NIS, NIS+ and NetInfo, there is no simple, reliable and portable method for performing this mapping. Thankfully, the only place in the VC code that depends on the mapping of a uid to a login name is the vc-file-owner function. This returns the login of the owner of the file as a string. This function has been advised to use the output of ls on the remote machine to determine the login name, delegating the problem of mapping the uid to the login to the remote system which should know more about it than I do. How VC determines what release your RCS is VC needs to know what release your revision control binaries you are running as not all features VC supports are available with older versions of rcs(1), cvs(1) or sccs(1). The default implementation of VC determines this value the first time it is needed and then stores the value globally to avoid the overhead of executing a process and parsing its output each time the information is needed. Unfortunately, life is not quite so easy when remote version control comes into the picture. Each remote machine may have a different version of the version control tools and, while this is painful, we need to ensure that unavailable features are not used remotely. To resolve this issue, tramp currently takes the sledgehammer approach of making the release values of the revision control tools local to each tramp buffer, forcing VC to determine these values again each time a new file is visited. This has, quite obviously, some performance implications. Thankfully, most of the common operations performed by VC do not actually require that the remote version be known. This makes the problem far less apparent. Eventually these values will be captured by tramp on a system by system basis and the results cached to improve performance. How file names, directories and localnames are mangled and managed. Breaking a localname into its components. tramp file names are somewhat different, obviously, to ordinary file names. As such, the lisp functions file-name-directory and file-name-nondirectory are overridden within the tramp package. Their replacements are reasonably simplistic in their approach. They dissect the filename, call the original handler on the localname and then rebuild the tramp file name with the result. This allows the platform specific hacks in the original handlers to take effect while preserving the tramp file name information. Debatable Issues and What Was Decided The uuencode method does not always work.Due to the design of tramp, the encoding and decoding programsneed to read from stdin and write to stdout. On some systems,uudecode -o - will read stdin and write the decoded file tostdout, on other systems uudecode -p does the same thing.But some systems have uudecode implementations which cannot do this atall—it is not possible to call these uudecode implementations withsuitable parameters so that they write to stdout.Of course, this could be circumvented: the begin foo 644 linecould be rewritten to put in some temporary file name, thenuudecode could be called, then the temp file could beprinted and deleted.But I have decided that this is too fragile to reliably work, so on somesystems you'll have to do without the uuencode methods. tramp does not work on XEmacs 20.This is because it requires the macro with-timeout which does notappear to exist in XEmacs 20. I'm somewhat reluctant to add anemulation macro to tramp, but if somebody who uses XEmacs 20 stepsforward and wishes to implement and test it, please contact me or themailing list. The tramp filename syntax differs between GNU Emacs and XEmacs.The GNU Emacs maintainers wish to use a unified filename syntax forAnge-FTP and tramp so that users don't have to learn a newsyntax. It is sufficient to learn some extensions to the old syntax.For the XEmacs maintainers, the problems caused from using a unifiedfilename syntax are greater than the gains. The XEmacs package systemuses EFS for downloading new packages. So, obviously, EFS has to beinstalled from the start. If the filenames were unified, trampwould have to be installed from the start, too. GNU Free Documentation License
Version 1.2, November 2002
Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. PREAMBLEThe purpose of this License is to make a manual, textbook, or otherfunctional and useful document “free” in the sense of freedom: toassure 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 wayto get credit for their work, while not being considered responsiblefor modifications made by others.This License is a kind of “copyleft,” which means that derivativeworks of the document must themselves be free in the same sense. Itcomplements the GNU General Public License, which is a copyleftlicense designed for free software.We have designed this License in order to use it for manuals for freesoftware, because free software needs free documentation: a freeprogram should come with manuals providing the same freedoms that thesoftware does. But this License is not limited to software manuals;it can be used for any textual work, regardless of subject matter orwhether it is published as a printed book. We recommend this Licenseprincipally for works whose purpose is instruction or reference. APPLICABILITY AND DEFINITIONSThis License applies to any manual or other work, in any medium, thatcontains a notice placed by the copyright holder saying it can bedistributed under the terms of this License. Such a notice grants aworld-wide, royalty-free license, unlimited in duration, to use thatwork under the conditions stated herein. The “Document,” below,refers to any such manual or work. Any member of the public is alicensee, and is addressed as “you.” You accept the license if youcopy, modify or distribute the work in a way requiring permissionunder copyright law.A “Modified Version” of the Document means any work containing theDocument or a portion of it, either copied verbatim, or withmodifications and/or translated into another language.A “Secondary Section” is a named appendix or a front-matter section ofthe Document that deals exclusively with the relationship of thepublishers or authors of the Document to the Document's overall subject(or to related matters) and contains nothing that could fall directlywithin that overall subject. (Thus, if the Document is in part atextbook of mathematics, a Secondary Section may not explain anymathematics.) The relationship could be a matter of historicalconnection with the subject or with related matters, or of legal,commercial, philosophical, ethical or political position regardingthem.The “Invariant Sections” are certain Secondary Sections whose titlesare designated, as being those of Invariant Sections, in the noticethat says that the Document is released under this License. If asection does not fit the above definition of Secondary then it is notallowed to be designated as Invariant. The Document may contain zeroInvariant Sections. If the Document does not identify any InvariantSections 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 thatthe Document is released under this License. A Front-Cover Text maybe 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 thegeneral public, that is suitable for revising the documentstraightforwardly with generic text editors or (for images composed ofpixels) generic paint programs or (for drawings) some widely availabledrawing editor, and that is suitable for input to text formatters orfor automatic translation to a variety of formats suitable for inputto text formatters. A copy made in an otherwise Transparent fileformat whose markup, or absence of markup, has been arranged to thwartor discourage subsequent modification by readers is not Transparent.An image format is not Transparent if used for any substantial amountof text. A copy that is not “Transparent” is called “Opaque.”Examples of suitable formats for Transparent copies include plainASCII without markup, Texinfo input format, LaTeX input format, SGMLor XML using a publicly available DTD, and standard-conforming simpleHTML, PostScript or PDF designed for human modification. Examples oftransparent image formats include PNG, XCF and JPG. Opaque formatsinclude proprietary formats that can be read and edited only byproprietary word processors, SGML or XML for which the DTD and/orprocessing tools are not generally available, and themachine-generated HTML, PostScript or PDF produced by some wordprocessors 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 materialthis License requires to appear in the title page. For works informats which do not have any title page as such, “Title Page” meansthe text near the most prominent appearance of the work's title,preceding the beginning of the body of the text.A section “Entitled XYZ” means a named subunit of the Document whosetitle either is precisely XYZ or contains XYZ in parentheses followingtext that translates XYZ in another language. (Here XYZ stands for aspecific 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 asection “Entitled XYZ” according to this definition.The Document may include Warranty Disclaimers next to the notice whichstates that this License applies to the Document. These WarrantyDisclaimers are considered to be included by reference in thisLicense, but only as regards disclaiming warranties: any otherimplication that these Warranty Disclaimers may have is void and hasno effect on the meaning of this License. VERBATIM COPYINGYou may copy and distribute the Document in any medium, eithercommercially or noncommercially, provided that this License, thecopyright notices, and the license notice saying this License appliesto the Document are reproduced in all copies, and that you add no otherconditions whatsoever to those of this License. You may not usetechnical measures to obstruct or control the reading or furthercopying of the copies you make or distribute. However, you may acceptcompensation in exchange for copies. If you distribute a large enoughnumber of copies you must also follow the conditions in section 3.You may also lend copies, under the same conditions stated above, andyou may publicly display copies. COPYING IN QUANTITYIf you publish printed copies (or copies in media that commonly haveprinted covers) of the Document, numbering more than 100, and theDocument's license notice requires Cover Texts, you must enclose thecopies in covers that carry, clearly and legibly, all these CoverTexts: Front-Cover Texts on the front cover, and Back-Cover Texts onthe back cover. Both covers must also clearly and legibly identifyyou as the publisher of these copies. The front cover must presentthe full title with all words of the title equally prominent andvisible. You may add other material on the covers in addition.Copying with changes limited to the covers, as long as they preservethe title of the Document and satisfy these conditions, can be treatedas verbatim copying in other respects.If the required texts for either cover are too voluminous to fitlegibly, you should put the first ones listed (as many as fitreasonably) on the actual cover, and continue the rest onto adjacentpages.If you publish or distribute Opaque copies of the Document numberingmore than 100, you must either include a machine-readable Transparentcopy along with each Opaque copy, or state in or with each Opaque copya computer-network location from which the general network-usingpublic has access to download using public-standard network protocolsa 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 ensurethat this Transparent copy will remain thus accessible at the statedlocation until at least one year after the last time you distribute anOpaque copy (directly or through your agents or retailers) of thatedition to the public.It is requested, but not required, that you contact the authors of theDocument well before redistributing any large number of copies, to givethem a chance to provide you with an updated version of the Document. MODIFICATIONSYou may copy and distribute a Modified Version of the Document underthe conditions of sections 2 and 3 above, provided that you releasethe Modified Version under precisely this License, with the ModifiedVersion filling the role of the Document, thus licensing distributionand modification of the Modified Version to whoever possesses a copyof 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 orappendices that qualify as Secondary Sections and contain no materialcopied from the Document, you may at your option designate some or allof these sections as invariant. To do this, add their titles to thelist 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 containsnothing but endorsements of your Modified Version by variousparties–for example, statements of peer review or that the text hasbeen approved by an organization as the authoritative definition of astandard.You may add a passage of up to five words as a Front-Cover Text, and apassage of up to 25 words as a Back-Cover Text, to the end of the listof Cover Texts in the Modified Version. Only one passage ofFront-Cover Text and one of Back-Cover Text may be added by (orthrough arrangements made by) any one entity. If the Document alreadyincludes a cover text for the same cover, previously added by you orby 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 explicitpermission from the previous publisher that added the old one.The author(s) and publisher(s) of the Document do not by this Licensegive permission to use their names for publicity for or to assert orimply endorsement of any Modified Version. COMBINING DOCUMENTSYou may combine the Document with other documents released under thisLicense, under the terms defined in section 4 above for modifiedversions, provided that you include in the combination all of theInvariant Sections of all of the original documents, unmodified, andlist them all as Invariant Sections of your combined work in itslicense notice, and that you preserve all their Warranty Disclaimers.The combined work need only contain one copy of this License, andmultiple identical Invariant Sections may be replaced with a singlecopy. If there are multiple Invariant Sections with the same name butdifferent contents, make the title of each such section unique byadding at the end of it, in parentheses, the name of the originalauthor or publisher of that section if known, or else a unique number.Make the same adjustment to the section titles in the list ofInvariant 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 sectionsEntitled “Endorsements.” COLLECTIONS OF DOCUMENTSYou may make a collection consisting of the Document and other documentsreleased under this License, and replace the individual copies of thisLicense in the various documents with a single copy that is included inthe collection, provided that you follow the rules of this License forverbatim copying of each of the documents in all other respects.You may extract a single document from such a collection, and distributeit individually under this License, provided you insert a copy of thisLicense into the extracted document, and follow this License in allother respects regarding verbatim copying of that document. AGGREGATION WITH INDEPENDENT WORKSA compilation of the Document or its derivatives with other separateand independent documents or works, in or on a volume of a storage ordistribution medium, is called an “aggregate” if the copyrightresulting from the compilation is not used to limit the legal rightsof the compilation's users beyond what the individual works permit.When the Document is included in an aggregate, this License does notapply to the other works in the aggregate which are not themselvesderivative works of the Document.If the Cover Text requirement of section 3 is applicable to thesecopies of the Document, then if the Document is less than one half ofthe entire aggregate, the Document's Cover Texts may be placed oncovers that bracket the Document within the aggregate, or theelectronic equivalent of covers if the Document is in electronic form.Otherwise they must appear on printed covers that bracket the wholeaggregate. TRANSLATIONTranslation is considered a kind of modification, so you maydistribute translations of the Document under the terms of section 4.Replacing Invariant Sections with translations requires specialpermission from their copyright holders, but you may includetranslations of some or all Invariant Sections in addition to theoriginal versions of these Invariant Sections. You may include atranslation of this License, and all the license notices in theDocument, and any Warranty Disclaimers, provided that you also includethe original English version of this License and the original versionsof those notices and disclaimers. In case of a disagreement betweenthe translation and the original version of this License or a noticeor disclaimer, the original version will prevail.If a section in the Document is Entitled “Acknowledgements,”“Dedications,” or “History,” the requirement (section 4) to Preserveits Title (section 1) will typically require changing the actualtitle. TERMINATIONYou may not copy, modify, sublicense, or distribute the Document exceptas expressly provided for under this License. Any other attempt tocopy, modify, sublicense or distribute the Document is void, and willautomatically terminate your rights under this License. However,parties who have received copies, or rights, from you under thisLicense will not have their licenses terminated so long as suchparties remain in full compliance. FUTURE REVISIONS OF THIS LICENSEThe Free Software Foundation may publish new, revised versionsof the GNU Free Documentation License from time to time. Such newversions will be similar in spirit to the present version, but maydiffer in detail to address new problems or concerns. Seehttp://www.gnu.org/copyleft/.Each version of the License is given a distinguishing version number.If the Document specifies that a particular numbered version of thisLicense “or any later version” applies to it, you have the option offollowing the terms and conditions either of that specified version orof any later version that has been published (not as a draft) by theFree Software Foundation. If the Document does not specify a versionnumber of this License, you may choose any version ever published (notas a draft) by the Free Software Foundation. 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.2 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.
xreflabel="Concept Index" id="Concept-Index"> Concept Index .login file, see .profile file, see A auto-save, see B backup, see base-64 encoding, see behind the scenes, see bug reports, see C choosing the right method, see compile, see configuration, see connection types, overview, see create your own methods, see customizing completion, see customizing methods, see Cygwin and ssh-agent, see Cygwin, issues, see D default configuration, see default method, see details of operation, see development history, see dired, see E external methods, see external transfer methods, see external transfer methods, see F FAQ, see fcp (with fcp method), see fcp method, see filename completion, see filename examples, see filename syntax, see filename syntax for multi-hop files, see frequently asked questions, see fsh (with fcp method), see fsh method, see ftp method, see H history, see hop method rsh, see hop method ssh, see hop method su, see hop method sudo, see hop method telnet, see how it works, see I inline methods, see inline methods, see K Kerberos (with krlogin method), see km krlogin, see M method fcp, see method fsh, see method ftp, see method krlogin, see method multi, see method plink, see method pscp, see method rcp, see method rsh, see method rsync, see method scp, see method scpx, see method scpx with Cygwin, see method smb, see method ssh, see method sshx, see method sshx with Cygwin, see method su, see method sudo, see method telnet, see methods, external transfer, see methods, external transfer, see methods, inline, see methods, inline, see methods, multi-hop, see methods, multi-hop, see methods, out-of-band, see methods, out-of-band, see mimencode, see multi method, see multi-hop filename syntax, see multi-hop methods, see multi-hop methods, see O obtaining Tramp, see out-of-band methods, see out-of-band methods, see overview, see P passwords, see plink (with pscp method), see plink method, see pscp (with pscp method), see pscp method, see PuTTY (with pscp method), see R rcp (with rcp method), see rcp method, see recompile, see remote shell setup, see rsh (with rcp method), see rsh hop method, see rsh method, see rsync (with rsync method), see rsync method, see S scp (with scp method), see scp (with scpx method), see scp method, see scpx method, see scpx method with Cygwin, see selecting config files, see shell init files, see smb method, see ssh (with rsync method), see ssh (with scp method), see ssh (with scpx method), see ssh hop method, see ssh method, see ssh-agent, see SSH_AUTH_SOCK and GNU Emacs on Windows, see sshx method, see sshx method with Cygwin, see su hop method, see su method, see sudo hop method, see sudo method, see T telnet hop method, see telnet method, see tset Unix command, see type-ahead, see U Unix command tset, see using non-standard methods, see using tramp, see uuencode, see V Version Control, see