Sync to HEAD
[bpt/emacs.git] / man / tramp.texi
CommitLineData
fb7933a3
KG
1\input texinfo @c -*-texinfo-*-
2@c %**start of header
6344cbf1 3@setfilename ../info/tramp
fb7933a3
KG
4@settitle TRAMP User Manual
5@setchapternewpage odd
6@c %**end of header
7
8@c This is *so* much nicer :)
9@footnotestyle end
10
b1a2b924
KG
11@c In the Tramp CVS, the version number is auto-frobbed from
12@c configure.ac, so you should edit that file and run
13@c "autoconf && ./configure" to change the version number.
7e190783
KG
14
15@c Additionally, flags are set with respect to the Emacs flavor; and
16@c depending whether Tramp is packaged into (X)Emacs, or standalone.
17
b1a2b924 18@include trampver.texi
fb7933a3 19
fb7933a3
KG
20@c Macro to make formatting of the tramp program name consistent.
21@macro tramp
22@sc{tramp}
23@end macro
24
16674e4f 25@c Macros for formatting a filename.
884b79ec 26@c trampfn is for a full filename, trampfnmhp means method, host, localname
16674e4f 27@c were given, and so on.
884b79ec
KG
28@macro trampfn(method, user, host, localname)
29@value{tramp-prefix}@value{method}@value{user}@@@value{host}@value{tramp-postfix}@value{localname}
16674e4f 30@end macro
fb7933a3 31
f08d9f0e 32@copying
6b61353c 33Copyright @copyright{} 1999, 2000, 2001, 2002, 2003, 2004 Free Software
f08d9f0e
KG
34Foundation, Inc.
35
6b61353c 36@quotation
f08d9f0e
KG
37Permission is granted to copy, distribute and/or modify this document
38under the terms of the GNU Free Documentation License, Version 1.1 or
39any later version published by the Free Software Foundation; with no
40Invariant Sections, with the Front-Cover texts being ``A GNU
41Manual'', and with the Back-Cover Texts as in (a) below. A copy of the
42license is included in the section entitled ``GNU Free Documentation
43License'' in the Emacs manual.
44
45(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
46this GNU Manual, like GNU software. Copies published by the Free
47Software Foundation raise funds for GNU development.''
48
49This document is part of a collection distributed under the GNU Free
50Documentation License. If you want to distribute this document
51separately from the collection, you can do so by adding a copy of the
52license to the document, as described in section 6 of the license.
53@end quotation
54@end copying
55
41bed43c 56@c Entries for @command{install-info} to use
6b61353c 57@dircategory @value{emacs-name}
41bed43c
KG
58@direntry
59* TRAMP: (tramp). Transparent Remote Access, Multiple Protocol
6b61353c 60 @value{emacs-name} remote file access via rsh and rcp.
41bed43c
KG
61@end direntry
62
fb7933a3
KG
63@tex
64
65@titlepage
16674e4f 66@title @tramp{} version @trampver{} User Manual
fb7933a3
KG
67
68@author by Daniel Pittman
69@author based on documentation by Kai Gro@ss{}johann
f08d9f0e 70
fb7933a3 71@page
f08d9f0e 72@insertcopying
fb7933a3 73
fb7933a3
KG
74@end titlepage
75@page
76
77@end tex
78
79@ifnottex
92eeeafc 80@node Top, Overview, (dir), (dir)
16674e4f
KG
81@top @tramp{} version @trampver{} User Manual
82
83This file documents @tramp{} version @trampver{}, a remote file
84editing package for @value{emacs-name}.
fb7933a3
KG
85
86@tramp{} stands for `Transparent Remote (file) Access, Multiple
87Protocol'. This package provides remote file editing, similar to
16674e4f 88@value{ftp-package-name}.
fb7933a3 89
16674e4f
KG
90The difference is that @value{ftp-package-name} uses FTP to transfer
91files between the local and the remote host, whereas @tramp{} uses a
92combination of @command{rsh} and @command{rcp} or other work-alike
93programs, such as @command{ssh}/@command{scp}.
fb7933a3 94
fb7933a3
KG
95You can find the latest version of this document on the web at
96@uref{http://www.freesoftware.fsf.org/tramp/}.
97
7e190783
KG
98@c Pointer to the other Emacs flavor is necessary only in case of
99@c standalone installation. Text taken from trampinst.texi.
100@ifset tramp-inst
101@otherflavor{}
102@end ifset
103
fb7933a3 104@ifhtml
6b61353c
KH
105@ifset jamanual
106This manual is also available as a @uref{@value{japanese-manual},
107Japanese translation}.
108@end ifset
fb7933a3
KG
109
110The latest release of @tramp{} is available for
6b61353c 111@uref{http://savannah.nongnu.org/download/tramp/,
fb7933a3
KG
112download}, or you may see @ref{Obtaining @tramp{}} for more details,
113including the CVS server details.
114
6b61353c 115@tramp{} also has a @uref{http://savannah.nongnu.org/projects/tramp/,
fb7933a3
KG
116Savannah Project Page}.
117@end ifhtml
118
119There is a mailing list for @tramp{}, available at
120@email{tramp-devel@@mail.freesoftware.fsf.org}, and archived at
6b61353c
KH
121@uref{http://savannah.nongnu.org/mail/?group=tramp, Savannah Mail
122Archive}.
123@ifhtml
124Older archives are located at
125@uref{http://sourceforge.net/mailarchive/forum.php?forum=tramp-devel,
126SourceForge Mail Archive} and
127@uref{http://www.mail-archive.com/emacs-rcp@@ls6.cs.uni-dortmund.de/,
128The Mail Archive}.
129@c in HTML output, there's no new paragraph.
130@*@*
131@end ifhtml
fb7933a3 132
f08d9f0e
KG
133@insertcopying
134
fb7933a3
KG
135@end ifnottex
136
137@menu
fb7933a3
KG
138* Overview:: What @tramp{} can and cannot do.
139
140For the end user:
7e190783 141
18d6d595 142* Obtaining @tramp{}:: How to obtain @tramp{}.
16674e4f 143* History:: History of @tramp{}.
7e190783 144@ifset tramp-inst
16674e4f 145* Installation:: Installing @tramp{} with your @value{emacs-name}.
7e190783 146@end ifset
fb7933a3
KG
147* Configuration:: Configuring @tramp{} for use.
148* Usage:: An overview of the operation of @tramp{}.
16674e4f 149* Bug Reports:: Reporting Bugs and Problems.
fb7933a3 150* Frequently Asked Questions:: Questions and answers from the mailing list.
6b61353c 151* Concept Index:: An item for each concept.
fb7933a3
KG
152
153For the developer:
7e190783 154
fb7933a3 155* Version Control:: The inner workings of remote version control.
884b79ec 156* Files directories and localnames:: How file names, directories and localnames are mangled and managed.
16674e4f 157* Issues:: Debatable Issues and What Was Decided.
fb7933a3
KG
158
159@detailmenu
160 --- The Detailed Node Listing ---
7e190783
KG
161@c
162@ifset tramp-inst
163Installing @tramp{} with your @value{emacs-name}
164
165* Installation parameters:: Parameters in order to control installation.
166* Load paths:: How to plug-in @tramp{} into your environment.
6b61353c 167* Japanese manual:: Japanese manual.
7e190783
KG
168
169@end ifset
fb7933a3
KG
170
171Configuring @tramp{} for use
172
173* Connection types:: Types of connections made to remote machines.
174* Inline methods:: Inline methods.
175* External transfer methods:: External transfer methods.
176* Multi-hop Methods:: Connecting to a remote host using multiple hops.
177* Default Method:: Selecting a default method.
178* Customizing Methods:: Using Non-Standard Methods.
16674e4f 179* Customizing Completion:: Selecting config files for user/host name completion.
6b61353c 180* Password caching:: Reusing passwords for several connections.
fb7933a3 181* Remote Programs:: How @tramp{} finds and uses programs on the remote machine.
16674e4f
KG
182* Remote shell setup:: Remote shell setup hints.
183* Windows setup hints:: Issues with Cygwin ssh.
b1a2b924 184* Auto-save and Backup:: Auto-save and Backup.
fb7933a3 185
6b61353c 186Using @tramp{}
fb7933a3
KG
187
188* Filename Syntax:: @tramp{} filename conventions.
16674e4f
KG
189* Multi-hop filename syntax:: Multi-hop filename conventions.
190* Filename completion:: Filename completion.
191* Dired:: Dired.
fb7933a3
KG
192
193The inner workings of remote version control
194
195* Version Controlled Files:: Determining if a file is under version control.
196* Remote Commands:: Executing the version control commands on the remote machine.
197* Changed workfiles:: Detecting if the working file has changed.
198* Checking out files:: Bringing the workfile out of the repository.
16674e4f 199* Miscellaneous Version Control:: Things related to Version Control that don't fit elsewhere.
fb7933a3
KG
200
201Things related to Version Control that don't fit elsewhere
202
203* Remote File Ownership:: How VC determines who owns a workfile.
204* Back-end Versions:: How VC determines what release your RCS is.
205
7e190783 206How file names, directories and localnames are mangled and managed
fb7933a3 207
b1a2b924 208* Localname deconstruction:: Breaking a localname into its components.
fb7933a3
KG
209
210@end detailmenu
211@end menu
212
fb7933a3 213@node Overview
6b61353c 214@chapter An overview of @tramp{}
92eeeafc 215@cindex overview
fb7933a3 216
16674e4f
KG
217After the installation of @tramp{} into your @value{emacs-name}, you
218will be able to access files on remote machines as though they were
219local. Access to the remote file system for editing files, version
220control, and @command{dired} are transparently enabled.
fb7933a3
KG
221
222Your access to the remote machine can be with the @command{rsh},
223@command{rlogin}, @command{telnet} programs or with any similar
6b61353c
KH
224connection method. This connection must pass @acronym{ASCII}
225successfully to be usable but need not be 8-bit clean.
fb7933a3
KG
226
227The package provides support for @command{ssh} connections out of the
92eeeafc
KG
228box, one of the more common uses of the package. This allows
229relatively secure access to machines, especially if @command{ftp}
230access is disabled.
fb7933a3 231
92eeeafc
KG
232The majority of activity carried out by @tramp{} requires only that
233the remote login is possible and is carried out at the terminal. In
234order to access remote files @tramp{} needs to transfer their content
235to the local machine temporarily.
fb7933a3 236
92eeeafc
KG
237@tramp{} can transfer files between the machines in a variety of ways.
238The details are easy to select, depending on your needs and the
239machines in question.
fb7933a3 240
92eeeafc
KG
241The fastest transfer methods (for large files) rely on a remote file
242transfer package such as @command{rcp}, @command{scp} or
243@command{rsync}. The use of these methods is only possible if the
244file copy command does not ask for a password for the remote machine.
fb7933a3
KG
245
246If the remote copy methods are not suitable for you, @tramp{} also
92eeeafc
KG
247supports the use of encoded transfers directly through the shell.
248This requires that the @command{mimencode} or @command{uuencode} tools
249are available on the remote machine. These methods are generally
250faster for small files.
fb7933a3 251
92eeeafc
KG
252Within these limitations, @tramp{} is quite powerful. It is worth
253noting that, as of the time of writing, it is far from a polished
254end-user product. For a while yet you should expect to run into rough
255edges and problems with the code now and then.
fb7933a3
KG
256
257It is finished enough that the developers use it for day to day work but
258the installation and setup can be a little difficult to master, as can
259the terminology.
260
261@tramp{} is still under active development and any problems you encounter,
262trivial or major, should be reported to the @tramp{} developers.
263@xref{Bug Reports}.
264
265
266@subsubheading Behind the scenes
92eeeafc 267@cindex behind the scenes
e28e4d20
KG
268@cindex details of operation
269@cindex how it works
fb7933a3
KG
270
271This section tries to explain what goes on behind the scenes when you
272access a remote file through @tramp{}.
273
274Suppose you type @kbd{C-x C-f} and enter part of an @tramp{} file name,
275then hit @kbd{@key{TAB}} for completion. Suppose further that this is
276the first time that @tramp{} is invoked for the host in question. Here's
277what happens:
278
279@itemize
280@item
92eeeafc
KG
281@tramp{} discovers that it needs a connection to the host. So it
282invokes @samp{telnet @var{host}} or @samp{rsh @var{host} -l
283@var{user}} or a similar tool to connect to the remote host.
16674e4f
KG
284Communication with this process happens through an
285@value{emacs-name} buffer, that is, the output from the remote end
286goes into a buffer.
fb7933a3
KG
287
288@item
289The remote host may prompt for a login name (for @command{telnet}). The
290login name is given in the file name, so @tramp{} sends the login name and
291a newline.
292
293@item
294The remote host may prompt for a password or pass phrase (for
295@command{rsh} or for @command{telnet} after sending the login name).
296@tramp{} displays the prompt in the minibuffer, asking you for the
297password or pass phrase.
298
299You enter the password or pass phrase. @tramp{} sends it to the remote
300host, followed by a newline.
301
302@item
303@tramp{} now waits for the shell prompt or for a message that the login
304failed.
305
306If @tramp{} sees neither of them after a certain period of time (a minute,
307say), then it issues an error message saying that it couldn't find the
308remote shell prompt and shows you what the remote host has sent.
309
16674e4f
KG
310If @tramp{} sees a @samp{login failed} message, it tells you so,
311aborts the login attempt and allows you to try again.
fb7933a3
KG
312
313@item
314Suppose that the login was successful and @tramp{} sees the shell prompt
315from the remote host. Now @tramp{} invokes @command{/bin/sh} because
316Bourne shells and C shells have different command
317syntaxes.@footnote{Invoking @command{/bin/sh} will fail if your login
92eeeafc 318shell doesn't recognize @samp{exec /bin/sh} as a valid command.
fb7933a3
KG
319Maybe you use the Scheme shell @command{scsh}@dots{}}
320
321After the Bourne shell has come up, @tramp{} sends a few commands to
322ensure a good working environment. It turns off echoing, it sets the
323shell prompt, and a few other things.
324
325@item
326Now the remote shell is up and it good working order. Remember, what
327was supposed to happen is that @tramp{} tries to find out what files exist
328on the remote host so that it can do filename completion.
329
330So, @tramp{} basically issues @command{cd} and @command{ls} commands and
331also sometimes @command{echo} with globbing. Another command that is
332often used is @command{test} to find out whether a file is writable or a
333directory or the like. The output of each command is parsed for the
334necessary operation.
335
336@item
337Suppose you are finished with filename completion, have entered @kbd{C-x
338C-f}, a full file name and hit @kbd{@key{RET}}. Now comes the time to
339transfer the file contents from the remote host to the local host so
340that you can edit them.
341
342See above for an explanation of how @tramp{} transfers the file contents.
343
92eeeafc 344For inline transfers, @tramp{} issues a command like @samp{mimencode -b
fb7933a3
KG
345/path/to/remote/file}, waits until the output has accumulated in the
346buffer that's used for communication, then decodes that output to
347produce the file contents.
348
16674e4f
KG
349For out-of-band transfers, @tramp{} issues a command like the following:
350@example
351rcp user@@host:/path/to/remote/file /tmp/tramp.4711
352@end example
353It then reads the local temporary file @file{/tmp/tramp.4711} into a
354buffer and deletes the temporary file.
fb7933a3
KG
355
356@item
357You now edit the buffer contents, blithely unaware of what has happened
358behind the scenes. (Unless you have read this section, that is.) When
359you are finished, you type @kbd{C-x C-s} to save the buffer.
360
361@item
362Again, @tramp{} transfers the file contents to the remote host either
363inline or out-of-band. This is the reverse of what happens when reading
364the file.
365
366@end itemize
367
368I hope this has provided you with a basic overview of what happens
369behind the scenes when you open a file with @tramp{}.
370
371
372@c For the end user
373@node Obtaining @tramp{}
374@chapter Obtaining @tramp{}.
6b61353c 375@cindex obtaining @tramp{}
fb7933a3 376
b1a2b924
KG
377@tramp{} is freely available on the Internet and the latest release
378may be downloaded from
379@uref{http://savannah.nongnu.org/download/tramp/}. This
380release includes the full documentation and code for @tramp{},
381suitable for installation. But Emacs (21.4 or later) includes
382@tramp{} already, and there is a @tramp{} package for XEmacs, as well.
383So maybe it is easier to just use those. But if you want the bleeding
92eeeafc 384edge, read on@dots{...}
fb7933a3 385
b1a2b924
KG
386For the especially brave, @tramp{} is available from CVS. The CVS
387version is the latest version of the code and may contain incomplete
388features or new issues. Use these versions at your own risk.
fb7933a3
KG
389
390Instructions for obtaining the latest development version of @tramp{}
16674e4f 391from CVS can be found by going to the Savannah project page at the
b1a2b924
KG
392following URL and then clicking on the CVS link in the navigation bar
393at the top.
16674e4f
KG
394
395@noindent
6b61353c 396@uref{http://savannah.nongnu.org/projects/tramp/}
16674e4f
KG
397
398@noindent
399Or follow the example session below:
fb7933a3
KG
400
401@example
16674e4f 402] @strong{cd ~/@value{emacs-dir}}
6b61353c
KH
403] @strong{export CVS_RSH="ssh"}
404] @strong{cvs -z3 -d:ext:anoncvs@@savannah.nongnu.org:/cvsroot/tramp co tramp}
fb7933a3
KG
405@end example
406
16674e4f 407@noindent
b1a2b924
KG
408You should now have a directory @file{~/@value{emacs-dir}/tramp}
409containing the latest version of @tramp{}. You can fetch the latest
410updates from the repository by issuing the command:
fb7933a3
KG
411
412@example
16674e4f 413] @strong{cd ~/@value{emacs-dir}/tramp}
6b61353c 414] @strong{export CVS_RSH="ssh"}
fb7933a3
KG
415] @strong{cvs update -d}
416@end example
417
b1a2b924
KG
418@noindent
419Once you've got updated files from the CVS repository, you need to run
420@command{autoconf} in order to get an up-to-date @file{configure}
421script:
422
423@example
424] @strong{cd ~/@value{emacs-dir}/tramp}
425] @strong{autoconf}
426@end example
427
fb7933a3
KG
428
429@node History
430@chapter History of @tramp{}
92eeeafc
KG
431@cindex history
432@cindex development history
fb7933a3
KG
433
434Development was started end of November 1998. The package was called
92eeeafc
KG
435@file{rssh.el}, back then. It only provided one method to access a
436file, using @command{ssh} to log in to a remote host and using
437@command{scp} to transfer the file contents. After a while, the name
438was changed to @file{rcp.el}, and now it's @tramp{}. Along the way,
439many more methods for getting a remote shell and for transferring the
440file contents were added. Support for VC was added.
fb7933a3 441
92eeeafc
KG
442The most recent addition of major features were the multi-hop methods
443added in April 2000 and the unification of @tramp{} and Ange-FTP
444filenames in July 2002.
fb7933a3 445
7e190783
KG
446@c Installation chapter is necessary only in case of standalone
447@c installation. Text taken from trampinst.texi.
448@ifset tramp-inst
449@installationchapter{}
16674e4f 450@end ifset
fb7933a3 451
fb7933a3
KG
452@node Configuration
453@chapter Configuring @tramp{} for use
92eeeafc 454@cindex configuration
fb7933a3 455
92eeeafc 456@cindex default configuration
6b61353c
KH
457@tramp{} is (normally) fully functional when it is initially installed.
458It is initially configured to use the @command{ssh} program to connect
459to the remote host and to use base64 or uu encoding to transfer the
460files through that shell connection. So in the easiest case, you just
461type @kbd{C-x C-f} and then enter the filename
462@file{@value{tramp-prefix}@var{user}@@@var{machine}@value{tramp-postfix}@var{/path/to.file}}.
fb7933a3
KG
463
464On some hosts, there are problems with opening a connection. These are
465related to the behavior of the remote shell. See @xref{Remote shell
466setup}, for details on this.
467
92eeeafc
KG
468If you do not wish to use these commands to connect to the remote
469host, you should change the default connection and transfer method
6b61353c 470that @tramp{} uses. There are several different methods that @tramp{}
92eeeafc
KG
471can use to connect to remote machines and transfer files
472(@pxref{Connection types}).
fb7933a3 473
6b61353c
KH
474If you don't know which method is right for you, see @xref{Default
475Method}.
476
fb7933a3
KG
477
478@menu
479* Connection types:: Types of connections made to remote machines.
480* Inline methods:: Inline methods.
481* External transfer methods:: External transfer methods.
482* Multi-hop Methods:: Connecting to a remote host using multiple hops.
483* Default Method:: Selecting a default method.
6b61353c
KH
484 Here we also try to help those who
485 don't have the foggiest which method
486 is right for them.
fb7933a3 487* Customizing Methods:: Using Non-Standard Methods.
16674e4f 488* Customizing Completion:: Selecting config files for user/host name completion.
6b61353c 489* Password caching:: Reusing passwords for several connections.
fb7933a3
KG
490* Remote Programs:: How @tramp{} finds and uses programs on the remote machine.
491* Remote shell setup:: Remote shell setup hints.
492* Windows setup hints:: Issues with Cygwin ssh.
b1a2b924 493* Auto-save and Backup:: Auto-save and Backup.
fb7933a3
KG
494@end menu
495
496
497@node Connection types
498@section Types of connections made to remote machines.
92eeeafc 499@cindex connection types, overview
fb7933a3
KG
500
501There are two basic types of transfer methods, each with its own
92eeeafc 502advantages and limitations. Both types of connection make use of a
fb7933a3
KG
503remote shell access program such as @command{rsh}, @command{ssh} or
504@command{telnet} to connect to the remote machine.
505
6b61353c 506This connection is used to perform many of the operations that @tramp{}
fb7933a3
KG
507requires to make the remote file system transparently accessible from
508the local machine. It is only when visiting files that the methods
509differ.
510
92eeeafc
KG
511@cindex inline methods
512@cindex external transfer methods
513@cindex external methods
514@cindex out-of-band methods
515@cindex methods, inline
516@cindex methods, external transfer
517@cindex methods, out-of-band
518Loading or saving a remote file requires that the content of the file
16674e4f
KG
519be transfered between the two machines. The content of the file can be
520transfered over the same connection used to log in to the remote
521machine or the file can be transfered through another connection using
92eeeafc
KG
522a remote copy program such as @command{rcp}, @command{scp} or
523@command{rsync}. The former are called @dfn{inline methods}, the
524latter are called @dfn{out-of-band methods} or @dfn{external transfer
525methods} (@dfn{external methods} for short).
fb7933a3
KG
526
527The performance of the external transfer methods is generally better
92eeeafc
KG
528than that of the inline methods, at least for large files. This is
529caused by the need to encode and decode the data when transferring
530inline.
fb7933a3
KG
531
532The one exception to this rule are the @command{scp} based transfer
533methods. While these methods do see better performance when actually
534transferring files, the overhead of the cryptographic negotiation at
535startup may drown out the improvement in file transfer times.
536
537External transfer methods do require that the remote copy command is not
538interactive --- that is, the command does not prompt you for a password.
539If you cannot perform remote copies without a password, you will need to
540use an inline transfer method to work with @tramp{}.
541
92eeeafc
KG
542@cindex multi-hop methods
543@cindex methods, multi-hop
fb7933a3
KG
544A variant of the inline methods are the @dfn{multi-hop methods}.
545These methods allow you to connect a remote host using a number `hops',
546each of which connects to a different host. This is useful if you are
547in a secured network where you need to go through a bastion host to
548connect to the outside world.
549
550
551@node Inline methods
552@section Inline methods
92eeeafc
KG
553@cindex inline methods
554@cindex methods, inline
fb7933a3
KG
555
556The inline methods in @tramp{} are quite powerful and can work in
557situations where you cannot use an external transfer program to connect.
558Inline methods are the only methods that work when connecting to the
559remote machine via telnet. (There are also strange inline methods which
560allow you to transfer files between @emph{user identities} rather than
561hosts, see below.)
562
563These methods depend on the existence of a suitable encoding and
6b61353c
KH
564decoding command on remote machine. Locally, @tramp{} may be able to
565use features of @value{emacs-name} to decode and encode the files or
566it may require access to external commands to perform that task.
fb7933a3 567
92eeeafc 568@cindex uuencode
92eeeafc
KG
569@cindex mimencode
570@cindex base-64 encoding
f08d9f0e
KG
571@tramp{} checks the availability and usability of commands like
572@command{mimencode} (part of the @command{metamail} package) or
573@command{uuencode} on the remote host. The first reliable command
574will be used. The search path can be customized, see @ref{Remote
575Programs}.
fb7933a3 576
abc6be8d 577If both commands aren't available on the remote host, @tramp{}
f08d9f0e
KG
578transfers a small piece of Perl code to the remote host, and tries to
579apply it for encoding and decoding.
fb7933a3 580
fb7933a3 581
f08d9f0e
KG
582@table @asis
583@item @option{rsh}
584@cindex method rsh
585@cindex rsh method
fb7933a3 586
f08d9f0e
KG
587Connect to the remote host with @command{rsh}. Due to the unsecure
588connection it is recommended for very local host topology only.
fb7933a3 589
41bed43c
KG
590On operating systems which provide the command @command{remsh} instead
591of @command{rsh}, you can use the method @option{remsh}. This is true
592for HP-UX or Cray UNICOS, for example.
593
fb7933a3 594
f08d9f0e
KG
595@item @option{ssh}
596@cindex method ssh
597@cindex ssh method
fb7933a3 598
f08d9f0e
KG
599Connect to the remote host with @command{ssh}. This is identical to
600the previous option except that the @command{ssh} package is used,
601making the connection more secure.
fb7933a3 602
f08d9f0e
KG
603There are also two variants, @option{ssh1} and @option{ssh2}, that
604call @samp{ssh -1} and @samp{ssh -2}, respectively. This way, you can
90dc758d
KG
605explicitly select whether you want to use the SSH protocol version 1
606or 2 to connect to the remote host. (You can also specify in
607@file{~/.ssh/config}, the SSH configuration file, which protocol
f08d9f0e 608should be used, and use the regular @option{ssh} method.)
90dc758d 609
f08d9f0e
KG
610Two other variants, @option{ssh1_old} and @option{ssh2_old}, use the
611@command{ssh1} and @command{ssh2} commands explicitly. If you don't
612know what these are, you do not need these options.
fb7933a3 613
16674e4f 614All the methods based on @command{ssh} have an additional kludgy
8e3a1104
KG
615feature: you can specify a host name which looks like @file{host#42}
616(the real host name, then a hash sign, then a port number). This
617means to connect to the given host but to also pass @code{-p 42} as
618arguments to the @command{ssh} command.
619
fb7933a3 620
f08d9f0e
KG
621@item @option{telnet}
622@cindex method telnet
623@cindex telnet method
fb7933a3 624
f08d9f0e
KG
625Connect to the remote host with @command{telnet}. This is as unsecure
626as the @option{rsh} method.
fb7933a3 627
fb7933a3 628
f08d9f0e 629@item @option{su}
92eeeafc
KG
630@cindex method su
631@cindex su method
fb7933a3 632
f08d9f0e
KG
633This method does not connect to a remote host at all, rather it uses
634the @command{su} program to allow you to edit files as another user.
fb7933a3 635
fb7933a3 636
f08d9f0e
KG
637@item @option{sudo}
638@cindex method sudo
639@cindex sudo method
fb7933a3 640
f08d9f0e 641This is similar to the @option{su} method, but it uses @command{sudo}
fb7933a3
KG
642rather than @command{su} to become a different user.
643
644Note that @command{sudo} must be configured to allow you to start a
645shell as the user. It would be nice if it was sufficient if
f08d9f0e
KG
646@command{ls} and @command{mimencode} were allowed, but that is not
647easy to implement, so I haven't got around to it, yet.
fb7933a3 648
fb7933a3 649
f08d9f0e
KG
650@item @option{sshx}
651@cindex method sshx
652@cindex sshx method
653@cindex Cygwin (with sshx method)
fb7933a3 654
6b61353c 655As you would expect, this is similar to @option{ssh}, only a little
f08d9f0e 656different. Whereas @option{ssh} opens a normal interactive shell on
92eeeafc 657the remote host, this option uses @samp{ssh -t -t @var{host} -l
16674e4f 658@var{user} /bin/sh} to open a connection. This is useful for users
92eeeafc
KG
659where the normal login shell is set up to ask them a number of
660questions when logging in. This procedure avoids these questions, and
661just gives @tramp{} a more-or-less `standard' login shell to work
662with.
fb7933a3 663
83fa16cf
KG
664Note that this procedure does not eliminate questions asked by
665@command{ssh} itself. For example, @command{ssh} might ask ``Are you
666sure you want to continue connecting?'' if the host key of the remote
abc6be8d 667host is not known. @tramp{} does not know how to deal with such a
83fa16cf
KG
668question (yet), therefore you will need to make sure that you can log
669in without such questions.
670
fb7933a3 671This is also useful for Windows users where @command{ssh}, when
6b61353c
KH
672invoked from an @value{emacs-name} buffer, tells them that it is not
673allocating a pseudo tty. When this happens, the login shell is wont
674to not print any shell prompt, which confuses @tramp{} mightily. For
675reasons unknown, some Windows ports for @command{ssh} (maybe the
676Cygwin one) require the doubled @samp{-t} option.
fb7933a3 677
92eeeafc 678This supports the @samp{-p} kludge.
8e3a1104 679
fb7933a3 680
f08d9f0e
KG
681@item @option{krlogin}
682@cindex method krlogin
683@cindex km krlogin
684@cindex Kerberos (with krlogin method)
fb7933a3 685
f08d9f0e 686This method is also similar to @option{ssh}. It only uses the
fb7933a3
KG
687@command{krlogin -x} command to log in to the remote host.
688
689
f08d9f0e
KG
690@item @option{plink}
691@cindex method plink
692@cindex plink method
fb7933a3
KG
693
694This method is mostly interesting for Windows users using the PuTTY
92eeeafc 695implementation of SSH. It uses @samp{plink -ssh} to log in to the
fb7933a3
KG
696remote host.
697
41bed43c
KG
698Additionally, the method @option{plink1} is provided, which calls
699@samp{plink -1 -ssh} in order to use SSH protocol version 1
700explicitely.
701
fb7933a3
KG
702CCC: Do we have to connect to the remote host once from the command
703line to accept the SSH key? Maybe this can be made automatic?
704
abc6be8d
KG
705CCC: Does @command{plink} support the @samp{-p} option? @tramp{} will
706support that, anyway.
8e3a1104 707
92eeeafc 708@end table
fb7933a3
KG
709
710
711
712@node External transfer methods
713@section External transfer methods
92eeeafc
KG
714@cindex methods, external transfer
715@cindex methods, out-of-band
716@cindex external transfer methods
717@cindex out-of-band methods
fb7933a3
KG
718
719The external transfer methods operate through multiple channels, using
720the remote shell connection for many actions while delegating file
721transfers to an external transfer utility.
722
723This saves the overhead of encoding and decoding that multiplexing the
724transfer through the one connection has with the inline methods.
725
726If you want to use an external transfer method you @emph{must} be able
727to execute the transfer utility to copy files to and from the remote
728machine without any interaction.
729
92eeeafc 730@cindex ssh-agent
fb7933a3
KG
731This means that you will need to use @command{ssh-agent} if you use the
732@command{scp} program for transfers, or maybe your version of
733@command{scp} accepts a password on the command line.@footnote{PuTTY's
734@command{pscp} allows you to specify the password on the command line.}
735If you use @command{rsync} via @command{ssh} then the same rule must
736apply to that connection.
737
738If you cannot get @command{scp} to run without asking for a password but
739would still like to use @command{ssh} to secure your connection, have a
740look at the @command{ssh} based inline methods.
741
742
92eeeafc 743@table @asis
fb7933a3 744@item @option{rcp} --- @command{rsh} and @command{rcp}
92eeeafc
KG
745@cindex method rcp
746@cindex rcp method
e28e4d20
KG
747@cindex rcp (with rcp method)
748@cindex rsh (with rcp method)
fb7933a3
KG
749
750This method uses the @command{rsh} and @command{rcp} commands to connect
41bed43c 751to the remote machine and transfer files. This is probably the fastest
fb7933a3
KG
752connection method available.
753
41bed43c
KG
754The alternative method @option{remcp} uses the @command{remsh} and
755@command{rcp} commands. It should be applied on machines where
756@command{remsh} is used instead of @command{rsh}.
757
fb7933a3
KG
758
759@item @option{scp} --- @command{ssh} and @command{scp}
92eeeafc
KG
760@cindex method scp
761@cindex scp method
e28e4d20
KG
762@cindex scp (with scp method)
763@cindex ssh (with scp method)
fb7933a3
KG
764
765Using @command{ssh} to connect to the remote host and @command{scp} to
766transfer files between the machines is the best method for securely
767connecting to a remote machine and accessing files.
768
769The performance of this option is also quite good. It may be slower than
770the inline methods when you often open and close small files however.
771The cost of the cryptographic handshake at the start of an @command{scp}
772session can begin to absorb the advantage that the lack of encoding and
773decoding presents.
774
f08d9f0e
KG
775There are also two variants, @option{scp1} and @option{scp2}, that
776call @samp{ssh -1} and @samp{ssh -2}, respectively. This way, you can
777explicitly select whether you want to use the SSH protocol version 1
778or 2 to connect to the remote host. (You can also specify in
779@file{~/.ssh/config}, the SSH configuration file, which protocol
6b61353c 780should be used, and use the regular @option{scp} method.)
f08d9f0e
KG
781
782Two other variants, @option{scp1_old} and @option{scp2_old}, use the
783@command{ssh1} and @command{ssh2} commands explicitly. If you don't
784know what these are, you do not need these options.
785
16674e4f 786All the @command{ssh} based methods support the kludgy @samp{-p}
8e3a1104 787feature where you can specify a port number to connect to in the host
abc6be8d 788name. For example, the host name @file{host#42} tells @tramp{} to
92eeeafc 789specify @samp{-p 42} in the argument list for @command{ssh}.
8e3a1104 790
fb7933a3
KG
791
792@item @option{rsync} --- @command{ssh} and @command{rsync}
92eeeafc
KG
793@cindex method rsync
794@cindex rsync method
e28e4d20
KG
795@cindex rsync (with rsync method)
796@cindex ssh (with rsync method)
fb7933a3
KG
797
798Using the @command{ssh} command to connect securely to the remote
799machine and the @command{rsync} command to transfer files is almost
800identical to the @option{scp} method.
801
802While @command{rsync} performs much better than @command{scp} when
803transferring files that exist on both hosts, this advantage is lost if
804the file exists only on one side of the connection.
805
806The @command{rsync} based method may be considerably faster than the
807@command{rcp} based methods when writing to the remote system. Reading
abc6be8d 808files to the local machine is no faster than with a direct copy.
fb7933a3 809
92eeeafc 810This method supports the @samp{-p} hack.
8e3a1104 811
fb7933a3
KG
812
813@item @option{scpx} --- @command{ssh} and @command{scp}
92eeeafc
KG
814@cindex method scpx
815@cindex scpx method
e28e4d20
KG
816@cindex scp (with scpx method)
817@cindex ssh (with scpx method)
818@cindex Cygwin (with scpx method)
fb7933a3 819
6b61353c 820As you would expect, this is similar to @option{scp}, only a little
92eeeafc
KG
821different. Whereas @option{scp} opens a normal interactive shell on
822the remote host, this option uses @samp{ssh -t -t @var{host} -l
823@var{user} /bin/sh} to open a connection. This is useful for users
824where the normal login shell is set up to ask them a number of
825questions when logging in. This procedure avoids these questions, and
826just gives @tramp{} a more-or-less `standard' login shell to work
827with.
fb7933a3
KG
828
829This is also useful for Windows users where @command{ssh}, when
6b61353c
KH
830invoked from an @value{emacs-name} buffer, tells them that it is not
831allocating a pseudo tty. When this happens, the login shell is wont
832to not print any shell prompt, which confuses @tramp{} mightily.
833Maybe this applies to the Cygwin port of SSH.
fb7933a3 834
92eeeafc 835This method supports the @samp{-p} hack.
8e3a1104 836
fb7933a3
KG
837
838@item @option{pscp} --- @command{plink} and @command{pscp}
92eeeafc
KG
839@cindex method pscp
840@cindex pscp method
e28e4d20
KG
841@cindex pscp (with pscp method)
842@cindex plink (with pscp method)
843@cindex PuTTY (with pscp method)
fb7933a3
KG
844
845This method is similar to @option{scp}, but it uses the
846@command{plink} command to connect to the remote host, and it uses
847@command{pscp} for transferring the files. These programs are part
848of PuTTY, an SSH implementation for Windows.
849
92eeeafc 850CCC: Does @command{plink} support the @samp{-p} hack?
8e3a1104 851
fb7933a3
KG
852
853@item @option{fcp} --- @command{fsh} and @command{fcp}
92eeeafc
KG
854@cindex method fcp
855@cindex fcp method
e28e4d20
KG
856@cindex fsh (with fcp method)
857@cindex fcp (with fcp method)
fb7933a3
KG
858
859This method is similar to @option{scp}, but it uses the @command{fsh}
860command to connect to the remote host, and it uses @command{fcp} for
861transferring the files. @command{fsh/fcp} are a front-end for
862@command{ssh} which allow for reusing the same @command{ssh} session
863for submitting several commands. This avoids the startup overhead of
864@command{scp} (which has to establish a secure connection whenever it
865is called). Note, however, that you can also use one of the inline
866methods to achieve a similar effect.
867
92eeeafc
KG
868This method uses the command @samp{fsh @var{host} -l @var{user}
869/bin/sh -i} to establish the connection, it does not work to just say
870@command{fsh @var{host} -l @var{user}}.
fb7933a3 871
e28e4d20
KG
872@cindex method fsh
873@cindex fsh method
6b61353c 874
92eeeafc
KG
875There is no inline method using @command{fsh} as the multiplexing
876provided by the program is not very useful in our context. @tramp{}
877opens just one connection to the remote host and then keeps it open,
878anyway.
879
f08d9f0e 880
f08d9f0e
KG
881@item @option{ftp}
882@cindex method ftp
883@cindex ftp method
884
abc6be8d 885This is not a native @tramp{} method. Instead of, it forwards all
f08d9f0e 886requests to @value{ftp-package-name}.
6b61353c
KH
887@ifset xemacs
888This works only for unified filenames, see @ref{Issues}.
f08d9f0e
KG
889@end ifset
890
abc6be8d
KG
891
892@item @option{smb} --- @command{smbclient}
893@cindex method smb
894@cindex smb method
895
896This is another not natural @tramp{} method. It uses the
897@command{smbclient} command on different Unices in order to connect to
898an SMB server. An SMB server might be a Samba (or CIFS) server on
899another UNIX host or, more interesting, a host running MS Windows. So
900far, it is tested towards MS Windows NT, MS Windows 2000, and MS
901Windows XP.
902
884b79ec 903The first directory in the localname must be a share name on the remote
abc6be8d
KG
904host. Remember, that the @code{$} character in which default shares
905usually end, must be written @code{$$} due to environment variable
906substitution in file names. If no share name is given (i.e. remote
907directory @code{/}), all available shares are listed.
908
909Since authorization is done on share level, you will be prompted
910always for a password if you access another share on the same host.
6b61353c 911This can be suppressed by @ref{Password caching}.
abc6be8d
KG
912
913MS Windows uses for authorization both a user name and a domain name.
914Because of this, the @tramp{} syntax has been extended: you can
915specify a user name which looks like @code{user%domain} (the real user
916name, then a percent sign, then the domain name). So, to connect to
917the machine @code{melancholia} as user @code{daniel} of the domain
918@code{BIZARRE}, and edit @file{.emacs} in the home directory (share
919@code{daniel$}) I would specify the filename
920@file{@value{tramp-prefix}smb@value{tramp-postfix-single-hop}daniel%BIZARRE@@melancholia@value{tramp-postfix}/daniel$$/.emacs}.
921
922The domain name as well as the user name are optional. If no user
923name is specified at all, the anonymous user (without password
924prompting) is assumed. This is different from all other @tramp{}
925methods, where in such a case the local user name is taken.
926
927The @option{smb} method supports the @samp{-p} hack.
928
6b61353c
KH
929@strong{Please note:} If @value{emacs-name} runs locally under MS
930Windows, this method isn't available. Instead of, you can use UNC
931file names like @file{//melancholia/daniel$$/.emacs}. The only
932disadvantage is that there's no possibility to specify another user
933name.
abc6be8d 934
92eeeafc 935@end table
fb7933a3
KG
936
937@node Multi-hop Methods
938@section Connecting to a remote host using multiple hops
92eeeafc
KG
939@cindex multi-hop methods
940@cindex methods, multi-hop
fb7933a3
KG
941
942Sometimes, the methods described before are not sufficient. Sometimes,
943it is not possible to connect to a remote host using a simple command.
944For example, if you are in a secured network, you might have to log in
945to a `bastion host' first before you can connect to the outside world.
946Of course, the target host may also require a bastion host. The format
947of multi-hop filenames is slightly different than the format of normal
948@tramp{} methods.
949
92eeeafc
KG
950@cindex method multi
951@cindex multi method
884b79ec
KG
952A multi-hop file name specifies a method, a number of hops, and a
953localname (path name on the remote system). The method name is always
f08d9f0e 954@option{multi}.
fb7933a3 955
f08d9f0e
KG
956Each hop consists of a @dfn{hop method} specification, a user name and
957a host name. The hop method can be an inline method only. The
958following hop methods are (currently) available:
fb7933a3 959
92eeeafc
KG
960@table @option
961@item telnet
962@cindex hop method telnet
963@cindex telnet hop method
fb7933a3
KG
964
965Uses the well-known @command{telnet} program to connect to the host.
966Whereas user name and host name are supplied in the file name, the
967user is queried for the password.
968
92eeeafc
KG
969@item rsh
970@cindex hop method rsh
971@cindex rsh hop method
fb7933a3
KG
972
973This uses @command{rsh} to connect to the host. You do not need to
974enter a password unless @command{rsh} explicitly asks for it.
975
41bed43c
KG
976The variant @option{remsh} uses the @command{remsh} command. It
977should be applied on machines where @command{remsh} is used instead of
978@command{rsh}.
979
92eeeafc
KG
980@item ssh
981@cindex hop method ssh
982@cindex ssh hop method
fb7933a3
KG
983
984This uses @command{ssh} to connect to the host. You might have to enter
985a password or a pass phrase.
986
92eeeafc
KG
987@item su
988@cindex hop method su
989@cindex su hop method
fb7933a3
KG
990
991This method does not actually contact a different host, but it allows
992you to become a different user on the host you're currently on. This
993might be useful if you want to edit files as root, but the remote host
994does not allow remote root logins. In this case you can use
995@option{telnet}, @option{rsh} or @option{ssh} to connect to the
996remote host as a non-root user, then use an @option{su} hop to become
997root. But @option{su} need not be the last hop in a sequence, you could
998also use it somewhere in the middle, if the need arises.
999
f08d9f0e 1000Even though you @emph{must} specify both user and host with an
fb7933a3
KG
1001@option{su} hop, the host name is ignored and only the user name is
1002used.
1003
92eeeafc
KG
1004@item sudo
1005@cindex hop method sudo
1006@cindex sudo hop method
fb7933a3
KG
1007
1008This is similar to the @option{su} hop, except that it uses
1009@command{sudo} rather than @command{su} to become a different user.
1010
92eeeafc 1011@end table
fb7933a3 1012
92eeeafc
KG
1013Some people might wish to use port forwarding with @command{ssh} or
1014maybe they have to use a nonstandard port. This can be accomplished
1015by putting a stanza in @file{~/.ssh/config} for the account which
1016specifies a different port number for a certain host name. But it can
f08d9f0e
KG
1017also be accomplished within @tramp{}, by adding a multi-hop method.
1018For example:
fb7933a3
KG
1019
1020@lisp
16674e4f
KG
1021(add-to-list
1022 'tramp-multi-connection-function-alist
1023 '("sshf" tramp-multi-connect-rlogin "ssh %h -l %u -p 4400%n"))
fb7933a3
KG
1024@end lisp
1025
16674e4f 1026Now you can use an @code{sshf} hop which connects to port 4400 instead of
fb7933a3
KG
1027the standard port.
1028
1029
1030@node Default Method
1031@section Selecting a default method
92eeeafc 1032@cindex default method
fb7933a3 1033
92eeeafc 1034@vindex tramp-default-method
fb7933a3 1035When you select an appropriate transfer method for your typical usage
6b61353c 1036you should set the variable @code{tramp-default-method} to reflect that
92eeeafc 1037choice. This variable controls which method will be used when a method
884b79ec 1038is not specified in the @tramp{} file name. For example:
fb7933a3
KG
1039
1040@lisp
1041(setq tramp-default-method "scp")
1042@end lisp
1043
92eeeafc
KG
1044@vindex tramp-default-method-alist
1045You can also specify different methods for certain user/host
6b61353c 1046combinations, via the variable @code{tramp-default-method-alist}. For
f08d9f0e 1047example, the following two lines specify to use the @option{ssh}
92eeeafc
KG
1048method for all user names matching @samp{john} and the @option{rsync}
1049method for all host names matching @samp{lily}. The third line
f08d9f0e 1050specifies to use the @option{su} method for the user @samp{root} on
92eeeafc
KG
1051the machine @samp{localhost}.
1052
1053@lisp
f08d9f0e 1054(add-to-list 'tramp-default-method-alist '("" "john" "ssh"))
92eeeafc
KG
1055(add-to-list 'tramp-default-method-alist '("lily" "" "rsync"))
1056(add-to-list 'tramp-default-method-alist
f08d9f0e 1057 '("\\`localhost\\'" "\\`root\\'" "su"))
92eeeafc
KG
1058@end lisp
1059
1060@noindent
1061See the documentation for the variable
6b61353c 1062@code{tramp-default-method-alist} for more details.
92eeeafc 1063
fb7933a3
KG
1064External transfer methods are normally preferable to inline transfer
1065methods, giving better performance. They may not be useful if you use
1066many remote machines where you cannot log in without a password.
1067
1068@xref{Inline methods}.
1069@xref{External transfer methods}.
1070@xref{Multi-hop Methods}.
1071
1072Another consideration with the selection of transfer methods is the
1073environment you will use them in and, especially when used over the
1074Internet, the security implications of your preferred method.
1075
1076The @command{rsh} and @command{telnet} methods send your password as
1077plain text as you log in to the remote machine, as well as transferring
1078the files in such a way that the content can easily be read from other
1079machines.
1080
1081If you need to connect to remote systems that are accessible from the
1082Internet, you should give serious thought to using @command{ssh} based
1083methods to connect. These provide a much higher level of security,
1084making it a non-trivial exercise for someone to obtain your password or
1085read the content of the files you are editing.
1086
6b61353c
KH
1087
1088@subsection Which method is the right one for me?
1089@cindex choosing the right method
1090
1091Given all of the above, you are probably thinking that this is all fine
1092and good, but it's not helping you to choose a method! Right you are.
1093As a developer, we don't want to boss our users around but give them
1094maximum freedom instead. However, the reality is that some users would
1095like to have some guidance, so here I'll try to give you this guidance
1096without bossing you around. You tell me whether it works @dots{}
1097
1098My suggestion is to use an inline method. For large files, out-of-band
1099methods might be more efficient, but I guess that most people will want
1100to edit mostly small files.
1101
1102I guess that these days, most people can access a remote machine by
1103using @code{ssh}. So I suggest that you use the @code{ssh} method.
1104So, type @kbd{C-x C-f /ssh:root@@otherhost:/etc/motd @key{RET}} to
1105edit the @file{/etc/motd} file on the other host.
1106
1107If you can't use @code{ssh} to log in to the remote host, then select a
1108method that uses a program that works. For instance, Windows users
1109might like the @code{plink} method which uses the PuTTY implementation
1110of @code{ssh}. Or you use Kerberos and thus like @code{krlogin}.
1111
1112For the special case of editing files on the local host as another
1113user, see the @code{su} or @code{sudo} method.
1114
1115People who edit large files may want to consider @code{scp} instead of
1116@code{ssh}, or @code{pscp} instead of @code{plink}. These out-of-band
1117methods are faster than inline methods for large files. Note, however,
1118that out-of-band methods suffer from some limitations. Please try
1119first whether you really get a noticeable speed advantage from using an
1120out-of-band method! Maybe even for large files, inline methods are
1121fast enough.
1122
1123The reason why I'm suggesting to use inline methods is that they work
1124even if the remote end is asking you for a password. Out-of-band
1125methods don't work in this situation. Also, multi-hop methods are
1126inherently inline.
1127
1128
fb7933a3
KG
1129@node Customizing Methods
1130@section Using Non-Standard Methods
92eeeafc
KG
1131@cindex customizing methods
1132@cindex using non-standard methods
1133@cindex create your own methods
fb7933a3
KG
1134
1135There is a variable @code{tramp-methods} which you can change if the
1136predefined methods don't seem right.
1137
1138For the time being, I'll refer you to the Lisp documentation of that
1139variable, accessible with @kbd{C-h v tramp-methods @key{RET}}.
1140
1141
16674e4f
KG
1142@node Customizing Completion
1143@section Selecting config files for user/host name completion
1144@cindex customizing completion
1145@cindex selecting config files
1146@vindex tramp-completion-function-alist
1147
1148The variable @code{tramp-completion-function-alist} is intended to
abc6be8d 1149customize which files are taken into account for user and host name
16674e4f
KG
1150completion (@pxref{Filename completion}). For every method, it keeps
1151a set of configuration files, accompanied by a Lisp function able to
1152parse that file. Entries in @code{tramp-completion-function-alist}
1153have the form (@var{method} @var{pair1} @var{pair2} ...).
1154
1155Each @var{pair} is composed of (@var{function} @var{file}).
1156@var{function} is responsible to extract user names and host names
1157from @var{file} for completion. There are two functions which access
1158this variable:
1159
1160@defun tramp-get-completion-function method
1161This function returns the list of completion functions for @var{method}.
1162
1163Example:
1164@example
1165(tramp-get-completion-function "rsh")
1166
1167 @result{} ((tramp-parse-rhosts "/etc/hosts.equiv")
1168 (tramp-parse-rhosts "~/.rhosts"))
1169@end example
1170@end defun
1171
1172@defun tramp-set-completion-function method function-list
1173This function sets @var{function-list} as list of completion functions
6b61353c 1174for @var{method}.
16674e4f
KG
1175
1176Example:
1177@example
1178(tramp-set-completion-function "ssh"
18d6d595
KG
1179 '((tramp-parse-sconfig "/etc/ssh_config")
1180 (tramp-parse-sconfig "~/.ssh/config")))
16674e4f 1181
18d6d595
KG
1182 @result{} ((tramp-parse-sconfig "/etc/ssh_config")
1183 (tramp-parse-sconfig "~/.ssh/config"))
16674e4f
KG
1184@end example
1185@end defun
1186
18d6d595 1187The following predefined functions parsing configuration files exist:
16674e4f
KG
1188
1189@table @asis
1190@item @code{tramp-parse-rhosts}
1191@findex tramp-parse-rhosts
1192
1193This function parses files which are syntactical equivalent to
1194@file{~/.rhosts}. It returns both host names and user names, if
1195specified.
1196
1197@item @code{tramp-parse-shosts}
1198@findex tramp-parse-shosts
1199
1200This function parses files which are syntactical equivalent to
18d6d595 1201@file{~/.ssh/known_hosts}. Since there are no user names specified
16674e4f
KG
1202in such files, it can return host names only.
1203
18d6d595
KG
1204@item @code{tramp-parse-sconfig}
1205@findex tramp-parse-shosts
1206
41bed43c 1207This function returns the host nicknames defined by @code{Host} entries
18d6d595
KG
1208in @file{~/.ssh/config} style files.
1209
6b61353c
KH
1210@item @code{tramp-parse-shostkeys}
1211@findex tramp-parse-shostkeys
1212
1213SSH2 parsing of directories @file{/etc/ssh2/hostkeys/*} and
1214@file{~/ssh2/hostkeys/*}. Hosts are coded in file names
1215@file{hostkey_PORTNUMBER_HOST-NAME.pub}. User names are always nil.
1216
1217@item @code{tramp-parse-sknownhosts}
1218@findex tramp-parse-shostkeys
1219
1220Another SSH2 style parsing of directories like
1221@file{/etc/ssh2/knownhosts/*} and @file{~/ssh2/knownhosts/*}. This
1222case, hosts names are coded in file names
1223@file{HOST-NAME.ALGORITHM.pub}. User names are always nil.
1224
16674e4f
KG
1225@item @code{tramp-parse-hosts}
1226@findex tramp-parse-hosts
1227
1228A function dedicated to @file{/etc/hosts} style files. It returns
1229host names only.
1230
1231@item @code{tramp-parse-passwd}
1232@findex tramp-parse-passwd
1233
292ffc15
KG
1234A function which parses @file{/etc/passwd} like files. Obviously, it
1235can return user names only.
16674e4f 1236
292ffc15
KG
1237@item @code{tramp-parse-netrc}
1238@findex tramp-parse-netrc
1239
1240Finally, a function which parses @file{~/.netrc} like files.
1241@end table
16674e4f
KG
1242
1243If you want to keep your own data in a file, with your own structure,
1244you might provide such a function as well. This function must meet
1245the following conventions:
1246
1247@defun my-tramp-parse file
1248@var{file} must be either a file name on your host, or @code{nil}. The
1249function must return a list of (@var{user} @var{host}), which are
1250taken as candidates for user and host name completion.
1251
1252Example:
1253@example
1254(my-tramp-parse "~/.my-tramp-hosts")
1255
1256 @result{} ((nil "toto") ("daniel" "melancholia"))
1257@end example
1258@end defun
1259
1260
6b61353c
KH
1261@node Password caching
1262@section Reusing passwords for several connections.
1263@cindex passwords
1264
1265Sometimes it is necessary to connect to the same remote host several
1266times. Reentering passwords again and again would be annoying, when
1267the choosen method does not support access without password prompt
1268throught own configuration.
1269
1270By default, @tramp{} caches the passwords entered by you. They will
1271be reused next time if a connection needs them for the same user name
1272and host name, independant of the connection method.
1273
1274@vindex password-cache-expiry
1275Passwords are not saved permanently, that means the password caching
1276is limited to the lifetime of your @value{emacs-name} session. You
1277can influence the lifetime of password caching by customizing the
1278variable @code{password-cache-expiry}. The value is the number of
1279seconds how long passwords are cached. Setting it to @code{nil}
1280disables the expiration.
1281
1282@findex tramp-clear-passwd
1283A password is removed from the cache if a connection isn't established
1284successfully. You can remove a password from the cache also by
1285executing @kbd{M-x tramp-clear-passwd} in a buffer containing a
1286related remote file or directory.
1287
1288@vindex password-cache
1289If you don't like this feature for security reasons, password caching
1290can be disabled totally by customizing the variable
1291@code{password-cache} (setting it to @code{nil}).
1292
1293Implementation Note: password caching is based on the package
1294password.el in No Gnus. For the time being, it is activated only when
1295this package is seen in the @code{load-path} while loading @tramp{}.
1296@ifset tramp-inst
1297If you don't use No Gnus, you can take password.el from the @tramp{}
1298@file{contrib} directory, see @ref{Installation parameters}.
1299@end ifset
1300It will be activated mandatory once No Gnus has found its way into
1301@value{emacs-name}.
1302
1303
fb7933a3
KG
1304@node Remote Programs
1305@section How @tramp{} finds and uses programs on the remote machine.
1306
1307@tramp{} depends on a number of programs on the remote host in order to
1308function, including @command{ls}, @command{test}, @command{find} and
1309@command{cat}.
1310
1311In addition to these required tools, there are various tools that may be
1312required based on the connection method. See @ref{Inline methods} and
1313@ref{External transfer methods} for details on these.
1314
1315Certain other tools, such as @command{perl} (or @command{perl5}) and
1316@command{grep} will be used if they can be found. When they are
1317available, they are used to improve the performance and accuracy of
1318remote file access.
1319
92eeeafc 1320@vindex tramp-remote-path
fb7933a3
KG
1321When @tramp{} connects to the remote machine, it searches for the
1322programs that it can use. The variable @var{tramp-remote-path} controls
1323the directories searched on the remote machine.
1324
1325By default, this is set to a reasonable set of defaults for most
1326machines. It is possible, however, that your local (or remote ;) system
1327administrator has put the tools you want in some obscure local
1328directory.
1329
1330In this case, you can still use them with @tramp{}. You simply need to
1331add code to your @file{.emacs} to add the directory to the remote path.
1332This will then be searched by @tramp{} when you connect and the software
1333found.
1334
1335To add a directory to the remote search path, you could use code such
1336as:
1337
16674e4f
KG
1338@lisp
1339@i{;; We load @tramp{} to define the variable.}
1340(require 'tramp)
1341@i{;; We have @command{perl} in "/usr/local/perl/bin"}
92eeeafc 1342(add-to-list 'tramp-remote-path "/usr/local/perl/bin")
16674e4f
KG
1343@end lisp
1344
fb7933a3
KG
1345
1346@node Remote shell setup
1347@comment node-name, next, previous, up
1348@section Remote shell setup hints
92eeeafc 1349@cindex remote shell setup
e28e4d20
KG
1350@cindex @file{.profile} file
1351@cindex @file{.login} file
92eeeafc 1352@cindex shell init files
fb7933a3
KG
1353
1354As explained in the @ref{Overview} section, @tramp{} connects to the
1355remote host and talks to the shell it finds there. Of course, when you
1356log in, the shell executes its init files. Suppose your init file
16674e4f 1357requires you to enter the birth date of your mother; clearly @tramp{}
fb7933a3
KG
1358does not know this and hence fails to log you in to that host.
1359
1360There are different possible strategies for pursuing this problem. One
1361strategy is to enable @tramp{} to deal with all possible situations.
1362This is a losing battle, since it is not possible to deal with
1363@emph{all} situations. The other strategy is to require you to set up
6b61353c 1364the remote host such that it behaves like @tramp{} expects. This might
fb7933a3
KG
1365be inconvenient because you have to invest a lot of effort into shell
1366setup before you can begin to use @tramp{}.
1367
1368The package, therefore, pursues a combined approach. It tries to figure
1369out some of the more common setups, and only requires you to avoid
1370really exotic stuff. For example, it looks through a list of
1371directories to find some programs on the remote host. And also, it
abc6be8d 1372knows that it is not obvious how to check whether a file exists, and
fb7933a3
KG
1373therefore it tries different possibilities. (On some hosts and shells,
1374the command @code{test -e} does the trick, on some hosts the shell
1375builtin doesn't work but the program @code{/usr/bin/test -e} or
1376@code{/bin/test -e} works. And on still other hosts, @code{ls -d} is
1377the right way to do this.)
1378
1379Below you find a discussion of a few things that @tramp{} does not deal
1380with, and that you therefore have to set up correctly.
1381
92eeeafc
KG
1382@table @asis
1383@item @var{shell-prompt-pattern}
fb7933a3 1384@vindex shell-prompt-pattern
92eeeafc 1385
fb7933a3
KG
1386After logging in to the remote host, @tramp{} has to wait for the remote
1387shell startup to finish before it can send commands to the remote
1388shell. The strategy here is to wait for the shell prompt. In order to
1389recognize the shell prompt, the variable @code{shell-prompt-pattern} has
1390to be set correctly to recognize the shell prompt on the remote host.
1391
abc6be8d
KG
1392Note that @tramp{} requires the match for @code{shell-prompt-pattern}
1393to be at the end of the buffer. Many people have something like the
83fa16cf 1394following as the value for the variable: @code{"^[^>$][>$] *"}. Now
abc6be8d
KG
1395suppose your shell prompt is @code{a <b> c $ }. In this case,
1396@tramp{} recognizes the @code{>} character as the end of the prompt,
1397but it is not at the end of the buffer.
83fa16cf 1398
16674e4f
KG
1399@item @var{tramp-shell-prompt-pattern}
1400@vindex tramp-shell-prompt-pattern
1401
1402This regular expression is used by @tramp{} in the same way as
1403@code{shell-prompt-pattern}, to match prompts from the remote shell.
1404This second variable exists because the prompt from the remote shell
1405might be different from the prompt from a local shell --- after all,
1406the whole point of @tramp{} is to log in to remote hosts as a
1407different user. The default value of
1408@code{tramp-shell-prompt-pattern} is the same as the default value of
1409@code{shell-prompt-pattern}, which is reported to work well in many
1410circumstances.
1411
fb7933a3 1412@item @code{tset} and other questions
92eeeafc
KG
1413@cindex Unix command tset
1414@cindex tset Unix command
fb7933a3
KG
1415
1416Some people invoke the @code{tset} program from their shell startup
16674e4f
KG
1417scripts which asks the user about the terminal type of the shell.
1418Maybe some shells ask other questions when they are started. @tramp{}
1419does not know how to answer these questions. There are two approaches
1420for dealing with this problem. One approach is to take care that the
1421shell does not ask any questions when invoked from @tramp{}. You can
1422do this by checking the @code{TERM} environment variable, it will be
1423set to @code{dumb} when connecting.
fb7933a3
KG
1424
1425@vindex tramp-terminal-type
1426The variable @code{tramp-terminal-type} can be used to change this value
16674e4f
KG
1427to @code{dumb}.
1428
1429The other approach is to teach @tramp{} about these questions. See
1430the variables @code{tramp-actions-before-shell} and
1431@code{tramp-multi-actions} (for multi-hop connections).
fb7933a3 1432
6b61353c
KH
1433
1434@item Environment variables named like users in @file{.profile}
1435
1436If you have a user named frumple and set the variable @code{FRUMPLE} in
1437your shell environment, then this might cause trouble. Maybe rename
1438the variable to @code{FRUMPLE_DIR} or the like.
1439
1440This weird effect was actually reported by a @tramp{} user!
1441
1442
6013ce47
KG
1443@item Non-Bourne commands in @file{.profile}
1444
1445After logging in to the remote host, @tramp{} issues the command
1446@code{exec /bin/sh}. (Actually, the command is slightly different.)
1447When @code{/bin/sh} is executed, it reads some init files, such as
1448@file{~/.shrc} or @file{~/.profile}.
1449
1450Now, some people have a login shell which is not @code{/bin/sh} but a
1451Bourne-ish shell such as bash or ksh. Some of these people might put
1452their shell setup into the files @code{~/.shrc} or @code{~/.profile}.
1453This way, it is possible for non-Bourne constructs to end up in those
1454files. Then, @code{exec /bin/sh} might cause the Bourne shell to barf
1455on those constructs.
1456
1457As an example, imagine somebody putting @code{export FOO=bar} into the
1458file @file{~/.profile}. The standard Bourne shell does not understand
1459this syntax and will emit a syntax error when it reaches this line.
1460
1461Another example is the tilde (@code{~}) character, say when adding
1462@file{~/bin} to @code{$PATH}. Many Bourne shells will not expand this
1463character, and since there is usually no directory whose name consists
1464of the single character tilde, strange things will happen.
1465
1466What can you do about this?
1467
1468Well, one possibility is to make sure that everything in @file{~/.shrc}
1469and @file{~/.profile} on all remote hosts is Bourne-compatible. In the
1470above example, instead of @code{export FOO=bar}, you might use
1471@code{FOO=bar; export FOO} instead.
1472
1473The other possibility is to put your non-Bourne shell setup into some
1474other files. For example, bash reads the file @file{~/.bash_profile}
1475instead of @file{~/.profile}, if the former exists. So bash
1476aficionados just rename their @file{~/.profile} to
1477@file{~/.bash_profile} on all remote hosts, and Bob's your uncle.
1478
1479The @tramp{} developers would like to circumvent this problem, so if you
1480have an idea about it, please tell us. However, we are afraid it is not
1481that simple: before saying @code{exec /bin/sh}, @tramp{} does not know
1482which kind of shell it might be talking to. It could be a Bourne-ish
1483shell like ksh or bash, or it could be a csh derivative like tcsh, or
1484it could be zsh, or even rc. If the shell is Bourne-ish already, then
1485it might be prudent to omit the @code{exec /bin/sh} step. But how to
1486find out if the shell is Bourne-ish?
1487
92eeeafc 1488@end table
fb7933a3
KG
1489
1490
b1a2b924
KG
1491@node Auto-save and Backup
1492@section Auto-save and Backup configuration
1493@cindex auto-save
1494@cindex backup
1495@vindex backup-directory-alist
1496
6b61353c
KH
1497Normally, @value{emacs-name} writes backup files to the same directory
1498as the original files, but this behavior can be changed via the
1499variable @code{backup-directory-alist}. In connection with @tramp{},
1500this can have unexpected side effects. Suppose that you specify that
1501all backups should go to the directory @file{~/.emacs.d/backups/}, and
1502then you edit the file @file{/su:root@@localhost:/etc/secretfile}.
1503The effect is that the backup file will be owned by you and not by
1504root, thus possibly enabling others to see it even if they were not
1505intended to see it.
b1a2b924
KG
1506
1507When @code{backup-directory-alist} is nil (the default), such problems
1508do not occur.
1509
1510If you wish to customize the variable, the workaround is to include
6b61353c 1511special settings for @tramp{} files. For example, the following statement
b1a2b924
KG
1512effectively `turns off' the effect of @code{backup-directory-alist} for
1513@tramp{} files:
1514
1515@lisp
1516(require 'tramp)
1517(add-to-list 'backup-directory-alist
1518 (cons tramp-file-name-regexp nil))
1519@end lisp
1520
6b61353c
KH
1521The same problem can happen with auto-saving files.
1522@ifset emacs
1523Since @value{emacs-name} 21, the variable
1524@code{auto-save-file-name-transforms} keeps information, on which
1525directory an auto-saved file should go. By default, it is initialized
1526for @tramp{} files to the local temporary directory.
1527
1528On some versions of @value{emacs-name}, namely the version built for
1529Debian Linux, the variable @code{auto-save-file-name-transforms}
1530contains the directory where @value{emacs-name} was built. A
1531workaround is to manually set the variable to a sane value.
1532
1533If auto-saved files should go into the same directory as the original
1534files, @code{auto-save-file-name-transforms} should be set to nil.
1535
1536Another possibility is to set the variable
1537@code{tramp-auto-save-directory} to a proper value.
1538@end ifset
1539@ifset xemacs
1540For this purpose you can set the variable
1541@code{tramp-auto-save-directory} to a proper value.
1542@end ifset
1543
b1a2b924 1544
fb7933a3
KG
1545@node Windows setup hints
1546@section Issues with Cygwin ssh
e28e4d20 1547@cindex Cygwin, issues
fb7933a3
KG
1548
1549This section needs a lot of work! Please help.
1550
abc6be8d
KG
1551@cindex method sshx with Cygwin
1552@cindex sshx method with Cygwin
fb7933a3
KG
1553If you use the Cygwin installation of ssh (you have to explicitly select
1554it in the installer), then it should work out of the box to just select
abc6be8d 1555@code{sshx} as the connection method. You can find information about
fb7933a3
KG
1556setting up Cygwin in their FAQ at @uref{http://cygwin.com/faq/}.
1557
abc6be8d
KG
1558@cindex method scpx with Cygwin
1559@cindex scpx method with Cygwin
1560If you wish to use the @code{scpx} connection method, then you might
6b61353c
KH
1561have the problem that @value{emacs-name} calls @code{scp} with a
1562Windows filename such as @code{c:/foo}. The Cygwin version of
1563@code{scp} does not know about Windows filenames and interprets this
1564as a remote filename on the host @code{c}.
abc6be8d
KG
1565
1566One possible workaround is to write a wrapper script for @code{scp}
1567which converts the Windows filename to a Cygwinized filename.
1568
6b61353c
KH
1569I guess that another workaround is to run @value{emacs-name} under
1570Cygwin, or to run a Cygwinized @value{emacs-name}.
abc6be8d
KG
1571
1572@cindex Cygwin and ssh-agent
6b61353c 1573@cindex SSH_AUTH_SOCK and @value{emacs-name} on Windows
abc6be8d
KG
1574If you want to use either @code{ssh} based method on Windows, then you
1575might encounter problems with @code{ssh-agent}. Using this program,
1576you can avoid typing the pass-phrase every time you log in (and the
1577@code{scpx} method more or less requires you to use @code{ssh-agent}
1578because it does not allow you to type a password or pass-phrase).
6b61353c
KH
1579However, if you start @value{emacs-name} from a desktop shortcut, then
1580the environment variable @code{SSH_AUTH_SOCK} is not set and so
1581@value{emacs-name} and thus @tramp{} and thus @code{ssh} and
1582@code{scp} started from @tramp{} cannot communicate with
1583@code{ssh-agent}. It works better to start @value{emacs-name} from
1584the shell.
abc6be8d
KG
1585
1586If anyone knows how to start @code{ssh-agent} under Windows in such a
1587way that desktop shortcuts can profit, please holler. I don't really
1588know anything at all about Windows@dots{}
1589
fb7933a3
KG
1590
1591@node Usage
6b61353c
KH
1592@chapter Using @tramp{}
1593@cindex using @tramp{}
fb7933a3
KG
1594
1595Once you have installed @tramp{} it will operate fairly transparently. You
1596will be able to access files on any remote machine that you can log in
1597to as though they were local.
1598
1599Files are specified to @tramp{} using a formalized syntax specifying the
92eeeafc 1600details of the system to connect to. This is similar to the syntax used
16674e4f
KG
1601by the @value{ftp-package-name} package.
1602
1603@cindex type-ahead
6b61353c
KH
1604Something that might happen which surprises you is that
1605@value{emacs-name} remembers all your keystrokes, so if you see a
1606password prompt from @value{emacs-name}, say, and hit @kbd{@key{RET}}
1607twice instead of once, then the second keystroke will be processed by
1608@value{emacs-name} after @tramp{} has done its thing. Why, this
1609type-ahead is normal behavior, you say. Right you are, but be aware
1610that opening a remote file might take quite a while, maybe half a
1611minute when a connection needs to be opened. Maybe after half a
1612minute you have already forgotten that you hit that key!
fb7933a3
KG
1613
1614@menu
1615* Filename Syntax:: @tramp{} filename conventions.
16674e4f
KG
1616* Multi-hop filename syntax:: Multi-hop filename conventions.
1617* Filename completion:: Filename completion.
1618* Dired:: Dired.
fb7933a3
KG
1619@end menu
1620
1621
1622@node Filename Syntax
1623@section @tramp{} filename conventions
92eeeafc
KG
1624@cindex filename syntax
1625@cindex filename examples
fb7933a3 1626
884b79ec 1627To access the file @var{localname} on the remote machine @var{machine} you
16674e4f 1628would specify the filename
884b79ec 1629@file{@value{tramp-prefix}@var{machine}@value{tramp-postfix}@var{localname}}.
16674e4f
KG
1630This will connect to @var{machine} and transfer the file using the
1631default method. @xref{Default Method}.
fb7933a3 1632
16674e4f 1633Some examples of @tramp{} filenames are shown below.
fb7933a3
KG
1634
1635@table @file
16674e4f 1636@item @value{tramp-prefix}melancholia@value{tramp-postfix}.emacs
fb7933a3
KG
1637Edit the file @file{.emacs} in your home directory on the machine
1638@code{melancholia}.
1639
16674e4f 1640@item @value{tramp-prefix}melancholia.danann.net@value{tramp-postfix}.emacs
fb7933a3
KG
1641This edits the same file, using the fully qualified domain name of
1642the machine.
1643
16674e4f 1644@item @value{tramp-prefix}melancholia@value{tramp-postfix}~/.emacs
fb7933a3
KG
1645This also edits the same file --- the @file{~} is expanded to your
1646home directory on the remote machine, just like it is locally.
1647
16674e4f 1648@item @value{tramp-prefix}melancholia@value{tramp-postfix}~daniel/.emacs
fb7933a3
KG
1649This edits the file @file{.emacs} in the home directory of the user
1650@code{daniel} on the machine @code{melancholia}. The @file{~<user>}
1651construct is expanded to the home directory of that user on the remote
1652machine.
1653
16674e4f 1654@item @value{tramp-prefix}melancholia@value{tramp-postfix}/etc/squid.conf
fb7933a3
KG
1655This edits the file @file{/etc/squid.conf} on the machine
1656@code{melancholia}.
1657
1658@end table
1659
16674e4f
KG
1660Unless you specify a different name to use, @tramp{} will use the
1661current local user name as the remote user name to log in with. If you
1662need to log in as a different user, you can specify the user name as
1663part of the filename.
fb7933a3 1664
16674e4f
KG
1665To log in to the remote machine as a specific user, you use the syntax
1666@file{@value{tramp-prefix}@var{user}@@@var{machine}@value{tramp-postfix}/@var{path/to.file}}.
1667That means that connecting to @code{melancholia} as @code{daniel} and
f37fc5a7 1668editing @file{.emacs} in your home directory you would specify
16674e4f 1669@file{@value{tramp-prefix}daniel@@melancholia@value{tramp-postfix}.emacs}.
fb7933a3
KG
1670
1671It is also possible to specify other file transfer methods
16674e4f
KG
1672(@pxref{Default Method}) as part of the filename.
1673@ifset emacs
1674This is done by putting the method before the user and host name, as
1675in
1676@file{@value{tramp-prefix}@var{method}@value{tramp-postfix-single-hop}}
abc6be8d 1677(Note the trailing colon).
16674e4f
KG
1678@end ifset
1679@ifset xemacs
1680This is done by replacing the initial
1681@file{@value{tramp-prefix}} with
1682@file{@value{tramp-prefix}<method>@value{tramp-postfix-single-hop}}.
1683(Note the trailing slash!).
1684@end ifset
1685The user, machine and file specification remain the same.
fb7933a3 1686
f37fc5a7 1687So, to connect to the machine @code{melancholia} as @code{daniel},
6b61353c 1688using the @option{ssh} method to transfer files, and edit @file{.emacs}
f37fc5a7 1689in my home directory I would specify the filename
6b61353c 1690@file{@value{tramp-prefix}ssh@value{tramp-postfix-single-hop}daniel@@melancholia@value{tramp-postfix}.emacs}.
fb7933a3
KG
1691
1692
1693@node Multi-hop filename syntax
1694@section Multi-hop filename conventions
92eeeafc
KG
1695@cindex filename syntax for multi-hop files
1696@cindex multi-hop filename syntax
fb7933a3
KG
1697
1698The syntax of multi-hop file names is necessarily slightly different
16674e4f 1699than the syntax of other @tramp{} file names. Here's an example
6b61353c 1700multi-hop file name:
fb7933a3 1701
16674e4f
KG
1702@example
1703@value{tramp-prefix}multi@value{tramp-postfix-single-hop}rsh@value{tramp-postfix-multi-hop}out@@gate@value{tramp-postfix-single-hop}telnet@value{tramp-postfix-multi-hop}kai@@real.host@value{tramp-postfix}/path/to.file
1704@end example
fb7933a3
KG
1705
1706This is quite a mouthful. So let's go through it step by step. The
16674e4f
KG
1707file name consists of three parts.
1708@ifset emacs
1709The parts are separated by colons
1710@end ifset
1711@ifset xemacs
1712The parts are separated by slashes and square brackets.
1713@end ifset
1714The first part is @file{@value{tramp-prefix}multi}, the method
1715specification. The second part is
1716@file{rsh@value{tramp-postfix-multi-hop}out@@gate@value{tramp-postfix-single-hop}telnet@value{tramp-postfix-multi-hop}kai@@real.host}
1717and specifies the hops. The final part is @file{/path/to.file} and
1718specifies the file name on the remote host.
fb7933a3 1719
abc6be8d 1720The first part and the final part should be clear. See @ref{Multi-hop
fb7933a3
KG
1721Methods}, for a list of alternatives for the method specification.
1722
16674e4f
KG
1723The second part can be subdivided again into components, so-called
1724hops. In the above file name, there are two hops,
1725@file{rsh@value{tramp-postfix-multi-hop}out@@gate} and
1726@file{telnet@value{tramp-postfix-multi-hop}kai@@real.host}.
fb7933a3
KG
1727
1728Each hop can @emph{again} be subdivided into (three) components, the
1729@dfn{hop method}, the @dfn{user name} and the @dfn{host name}. The
1730meaning of the second and third component should be clear, and the hop
1731method says what program to use to perform that hop.
1732
16674e4f
KG
1733The first hop, @file{rsh@value{tramp-postfix-multi-hop}out@@gate},
1734says to use @command{rsh} to log in as user @code{out} to the host
1735@code{gate}. Starting at that host, the second hop,
1736@file{telnet@value{tramp-postfix-multi-hop}kai@@real.host}, says to
1737use @command{telnet} to log in as user @code{kai} to host
1738@code{real.host}.
1739
1740@xref{Multi-hop Methods}, for a list of possible hop method values.
1741The variable @code{tramp-multi-connection-function-alist} contains the
1742list of possible hop methods and information on how to execute them,
1743should you want to add your own.
fb7933a3 1744
16674e4f
KG
1745
1746@node Filename completion
1747@section Filename completion
1748@cindex filename completion
1749
1750Filename completion works with @tramp{} for both completing methods,
1751user names and machine names (except multi hop methods) as well as for
1752files on remote machines.
1753
1754If you, for example, type @kbd{C-x C-f @value{tramp-prefix}t
1755@key{TAB}}, @tramp{} might give you as result the choice for
1756
1757@example
1758@ifset emacs
1759@value{tramp-prefix-single-hop}telnet@value{tramp-postfix-single-hop} tmp/
1760@value{tramp-prefix-single-hop}toto@value{tramp-postfix}
1761@end ifset
1762@ifset xemacs
1763@value{tramp-prefix-single-hop}telnet@value{tramp-postfix-single-hop} @value{tramp-prefix-single-hop}toto@value{tramp-postfix}
1764@end ifset
1765@end example
177c0ea7 1766
16674e4f
KG
1767@samp{@value{tramp-prefix-single-hop}telnet@value{tramp-postfix-single-hop}}
1768is a possible completion for the respective method,
1769@ifset emacs
1770@samp{tmp/} stands for the directory @file{/tmp} on your local
1771machine,
1772@end ifset
1773and @samp{@value{tramp-prefix-single-hop}toto@value{tramp-postfix}}
6b61353c 1774might be a host @tramp{} has detected in your @file{~/.ssh/known_hosts}
16674e4f
KG
1775file (given you're using default method @option{ssh}).
1776
1777If you go on to type @kbd{e @key{TAB}}, the minibuffer is completed to
1778@samp{@value{tramp-prefix}telnet@value{tramp-postfix-single-hop}}.
1779Next @kbd{@key{TAB}} brings you all machine names @tramp{} detects in
1780your @file{/etc/hosts} file, let's say
1781
1782@example
1783@value{tramp-prefix-single-hop}telnet@value{tramp-postfix-single-hop}127.0.0.1@value{tramp-postfix} @value{tramp-prefix-single-hop}telnet@value{tramp-postfix-single-hop}192.168.0.1@value{tramp-postfix}
1784@value{tramp-prefix-single-hop}telnet@value{tramp-postfix-single-hop}localhost@value{tramp-postfix} @value{tramp-prefix-single-hop}telnet@value{tramp-postfix-single-hop}melancholia.danann.net@value{tramp-postfix}
1785@value{tramp-prefix-single-hop}telnet@value{tramp-postfix-single-hop}melancholia@value{tramp-postfix}
1786@end example
1787
1788Now you can choose the desired machine, and you can continue to
1789complete file names on that machine.
1790
1791As filename completion needs to fetch the listing of files from the
1792remote machine, this feature is sometimes fairly slow. As @tramp{}
1793does not yet cache the results of directory listing, there is no gain
1794in performance the second time you complete filenames.
1795
1796If the configuration files (@pxref{Customizing Completion}), which
1797@tramp{} uses for analysis of completion, offer user names, those user
1798names will be taken into account as well.
fb7933a3
KG
1799
1800
1801@node Dired
16674e4f 1802@section Dired
92eeeafc 1803@cindex dired
fb7933a3
KG
1804
1805@tramp{} works transparently with dired, enabling you to use this powerful
1806file management tool to manage files on any machine you have access to
1807over the Internet.
1808
fb7933a3 1809If you need to browse a directory tree, Dired is a better choice, at
92eeeafc 1810present, than filename completion. Dired has its own cache mechanism
fb7933a3
KG
1811and will only fetch the directory listing once.
1812
1813
1814@node Bug Reports
1815@chapter Reporting Bugs and Problems
92eeeafc 1816@cindex bug reports
fb7933a3
KG
1817
1818Bugs and problems with @tramp{} are actively worked on by the development
1819team. Feature requests and suggestions are also more than welcome.
1820
1821The @tramp{} mailing list is a great place to get information on working
1822with @tramp{}, solving problems and general discussion and advice on topics
1823relating to the package.
1824
1825The mailing list is at @email{tramp-devel@@mail.freesoftware.fsf.org}.
1826Messages sent to this address go to all the subscribers. This is
1827@emph{not} the address to send subscription requests to.
1828
1829For help on subscribing to the list, send mail to the administrative
1830address, @email{tramp-devel-request@@mail.freesoftware.fsf.org}, with the
1831subject @samp{help}.
1832
1833To report a bug in @tramp{}, you should execute @kbd{M-x tramp-bug}. This
1834will automatically generate a buffer with the details of your system and
1835@tramp{} version.
1836
1837When submitting a bug report, please try to describe in excruciating
1838detail the steps required to reproduce the problem, the setup of the
1839remote machine and any special conditions that exist.
1840
1841If you can identify a minimal test case that reproduces the problem,
1842include that with your bug report. This will make it much easier for the
1843development team to analyze and correct the problem.
1844
1845@node Frequently Asked Questions
1846@chapter Frequently Asked Questions
92eeeafc
KG
1847@cindex frequently asked questions
1848@cindex FAQ
fb7933a3
KG
1849
1850@itemize @bullet
92eeeafc
KG
1851@item
1852Where can I get the latest @tramp{}?
fb7933a3 1853
16674e4f 1854@tramp{} is available under the URL below.
fb7933a3 1855
16674e4f 1856@noindent
b1a2b924 1857@uref{http://savannah.nongnu.org/download/tramp/}
16674e4f
KG
1858
1859@noindent
1860There is also a Savannah project page.
1861
1862@noindent
6b61353c 1863@uref{http://savannah.nongnu.org/projects/tramp/}
fb7933a3 1864
92eeeafc
KG
1865@item
1866Which systems does it work on?
fb7933a3
KG
1867
1868The package has been used successfully on Emacs 20 and Emacs 21, as well
1869as XEmacs 21. XEmacs 20 is more problematic, see the notes in
1870@file{tramp.el}. I don't think anybody has really tried it on Emacs 19.
1871
1872The package was intended to work on Unix, and it really expects a
6b61353c
KH
1873Unix-like system on the remote end (except the @option{smb} method),
1874but some people seemed to have some success getting it to work on NT
1875Emacs.
fb7933a3 1876
abc6be8d
KG
1877There is some informations on @tramp{} on NT at the following URL;
1878many thanks to Joe Stoy for providing the information:
fb7933a3
KG
1879@uref{ftp://ftp.comlab.ox.ac.uk/tmp/Joe.Stoy/}
1880
1881The above mostly contains patches to old ssh versions; Tom Roche has a
1882Web page with instructions:
1883@uref{http://www4.ncsu.edu/~tlroche/plinkTramp.html}
1884
1885??? Is the XEmacs info correct?
1886
1887??? Can somebody provide some information for getting it to work on NT
1888Emacs? I think there was some issue with @command{ssh}?
1889
1890
92eeeafc 1891@item
18d6d595
KG
1892I can't stop @value{ftp-package-name} starting with @value{emacs-name}
1893
1894@ifset emacs
1895@value{ftp-package-name} is loaded from @tramp{} automatically if you
1896require a file by the ftp method. Unfortunately, there are some Lisp
1897packages which make @value{ftp-package-name} file name handlers active.
1898You can see it applying @kbd{C-h v file-name-handler-alist}:
1899
1900@example
6b61353c 1901file-name-handler-alist's value is
18d6d595
KG
1902(("^/[^/:]*\\'" . ange-ftp-completion-hook-function)
1903 ("^/[^/:]*[^/:.]:" . ange-ftp-hook-function)
1904 ("^/[^/]*$" . tramp-completion-file-name-handler)
1905 ("\\`/[^/:]+:" . tramp-file-name-handler)
1906 ("\\`/:" . file-name-non-special))
1907@end example
1908
1909Please try to find out which package is responsible for loading
1910@value{ftp-package-name}, and raise a bug report.
fb7933a3 1911
18d6d595
KG
1912A workaround is to require @value{ftp-package-name} before @tramp{} in
1913your @file{~/.emacs}, because @tramp{} cleans up the entries in
1914@code{file-name-handler-alist}:
1915
1916@lisp
1917;; @value{ftp-package-name} temporarily required
1918(require 'ange-ftp)
1919;; @tramp{} cleans up @code{file-name-handler-alist}
1920(require 'tramp)
1921@end lisp
1922@end ifset
1923
1924@ifset xemacs
1925Not all the older versions of @tramp{} supported @value{emacs-name}
1926correctly. The first thing to do is to make sure that you have the
1927latest version of @tramp{} installed.
fb7933a3
KG
1928
1929If you do, please try and find out exactly the conditions required for
18d6d595
KG
1930the @value{ftp-package-name} handlers to fire. If you can, putting a
1931breakpoint on @code{efs-ftp-path} and sending in the stack trace along
1932with your bug report would make it easier for the developers to work out
1933what is going wrong.
1934@end ifset
fb7933a3
KG
1935
1936
92eeeafc
KG
1937@item
1938File name completion does not work with @tramp{}
fb7933a3
KG
1939
1940When you log in to the remote machine, do you see the output of
1941@command{ls} in color? If so, this may be the cause of your problems.
1942
1943@command{ls} outputs @acronym{ANSI} escape sequences that your terminal
18d6d595 1944emulator interprets to set the colors. These escape sequences will
fb7933a3
KG
1945confuse @tramp{} however.
1946
1947In your @file{.bashrc}, @file{.profile} or equivalent on the remote
1948machine you probably have an alias configured that adds the option
1949@option{--color=yes} or @option{--color=auto}.
1950
1951You should remove that alias and ensure that a new login @emph{does not}
18d6d595 1952display the output of @command{ls} in color. If you still cannot use
fb7933a3
KG
1953filename completion, report a bug to the @tramp{} developers.
1954
1955
92eeeafc
KG
1956@item
1957File name completion does not work in large directories
fb7933a3
KG
1958
1959@tramp{} uses globbing for some operations. (Globbing means to use the
1960shell to expand wildcards such as `*.c'.) This might create long
abc6be8d 1961command lines, especially in directories with many files. Some shells
fb7933a3
KG
1962choke on long command lines, or don't cope well with the globbing
1963itself.
1964
1965If you have a large directory on the remote end, you may wish to execute
92eeeafc 1966a command like @samp{ls -d * ..?* > /dev/null} and see if it hangs.
fb7933a3
KG
1967Note that you must first start the right shell, which might be
1968@command{/bin/sh}, @command{ksh} or @command{bash}, depending on which
1969of those supports tilde expansion.
1970
1971
92eeeafc
KG
1972@item
1973What kinds of systems does @tramp{} work on
fb7933a3
KG
1974
1975@tramp{} really expects the remote system to be a Unix-like system. The
1976local system should preferably be Unix-like, as well, but @tramp{} might
1977work on NT with some tweaking.
1978
1979
92eeeafc
KG
1980@item
1981How can I get notified when @tramp{} file transfers are complete?
fb7933a3 1982
6b61353c
KH
1983The following snippet can be put in your @file{~/.emacs} file. It
1984makes @value{emacs-name} beep after reading from or writing to the
1985remote host.
fb7933a3
KG
1986
1987@lisp
1988(defadvice tramp-handle-write-region
1989 (after tramp-write-beep-advice activate)
1990 " make tramp beep after writing a file."
1991 (interactive)
1992 (beep))
1993(defadvice tramp-handle-do-copy-or-rename-file
1994 (after tramp-copy-beep-advice activate)
1995 " make tramp beep after copying a file."
1996 (interactive)
1997 (beep))
1998(defadvice tramp-handle-insert-file-contents
1999 (after tramp-copy-beep-advice activate)
2000 " make tramp beep after copying a file."
2001 (interactive)
2002 (beep))
2003@end lisp
2004
2005
92eeeafc
KG
2006@item
2007There's this @file{~/.sh_history} file on the remote host which keeps
2008growing and growing. What's that?
fb7933a3
KG
2009
2010Sometimes, @tramp{} starts @code{ksh} on the remote host for tilde
2011expansion. Maybe @code{ksh} saves the history by default. @tramp{}
2012tries to turn off saving the history, but maybe you have to help. For
2013example, you could put this in your @file{.kshrc}:
2014
2015@example
2016if [ -f $HOME/.sh_history ] ; then
2017 /bin/rm $HOME/.sh_history
2018fi
2019if [ "$@{HISTFILE-unset@}" != "unset" ] ; then
2020 unset HISTFILE
2021fi
2022if [ "$@{HISTSIZE-unset@}" != "unset" ] ; then
2023 unset HISTSIZE
2024fi
2025@end example
2026
884b79ec
KG
2027
2028@item @tramp{} doesn't transfer strings with more than 500 characters
2029correctly
2030
2031On some few systems, the implementation of @code{process-send-string}
2032seems to be broken for longer strings. This case, you should
2033customize the variable @code{tramp-chunksize} to 500. For a
2034description how to determine whether this is necessary see the
2035documentation of @code{tramp-chunksize}.
2036
fb7933a3
KG
2037@end itemize
2038
2039
2040@c For the developer
2041@node Version Control
2042@chapter The inner workings of remote version control
41bed43c 2043@cindex Version Control
fb7933a3 2044
16674e4f
KG
2045Unlike @value{ftp-package-name}, @tramp{} has full shell access to the
2046remote machine. This makes it possible to provide version control for
2047files accessed under @tramp{}.
fb7933a3
KG
2048
2049The actual version control binaries must be installed on the remote
2050machine, accessible in the directories specified in
2051@var{tramp-remote-path}.
2052
2053This transparent integration with the version control systems is one of
2054the most valuable features provided by @tramp{}, but it is far from perfect.
2055Work is ongoing to improve the transparency of the system.
2056
2057@menu
2058* Version Controlled Files:: Determining if a file is under version control.
2059* Remote Commands:: Executing the version control commands on the remote machine.
2060* Changed workfiles:: Detecting if the working file has changed.
2061* Checking out files:: Bringing the workfile out of the repository.
16674e4f 2062* Miscellaneous Version Control:: Things related to Version Control that don't fit elsewhere.
fb7933a3
KG
2063@end menu
2064
2065
2066@node Version Controlled Files
2067@section Determining if a file is under version control
2068
2069The VC package uses the existence of on-disk revision control master
2070files to determine if a given file is under revision control. These file
2071tests happen on the remote machine through the standard @tramp{} mechanisms.
2072
2073
2074@node Remote Commands
2075@section Executing the version control commands on the remote machine
2076
2077There are no hooks provided by VC to allow intercepting of the version
2078control command execution. The calls occur through the
2079@code{call-process} mechanism, a function that is somewhat more
2080efficient than the @code{shell-command} function but that does not
2081provide hooks for remote execution of commands.
2082
2083To work around this, the functions @code{vc-do-command} and
2084@code{vc-simple-command} have been advised to intercept requests for
2085operations on files accessed via @tramp{}.
2086
2087In the case of a remote file, the @code{shell-command} interface is
2088used, with some wrapper code, to provide the same functionality on the
6b61353c 2089remote machine as would be seen on the local machine.
fb7933a3
KG
2090
2091
2092@node Changed workfiles
2093@section Detecting if the working file has changed
2094
2095As there is currently no way to get access to the mtime of a file on a
2096remote machine in a portable way, the @code{vc-workfile-unchanged-p}
2097function is advised to call an @tramp{} specific function for remote files.
2098
2099The @code{tramp-vc-workfile-unchanged-p} function uses the functioning VC
2100diff functionality to determine if any changes have occurred between the
2101workfile and the version control master.
2102
2103This requires that a shell command be executed remotely, a process that
2104is notably heavier-weight than the mtime comparison used for local
2105files. Unfortunately, unless a portable solution to the issue is found,
2106this will remain the cost of remote version control.
2107
2108
2109@node Checking out files
2110@section Bringing the workfile out of the repository
2111
2112VC will, by default, check for remote files and refuse to act on them
2113when checking out files from the repository. To work around this
2114problem, the function @code{vc-checkout} knows about @tramp{} files and
2115allows version control to occur.
2116
2117
2118@node Miscellaneous Version Control
2119@section Things related to Version Control that don't fit elsewhere
2120
2121Minor implementation details, &c.
2122
2123@menu
2124* Remote File Ownership:: How VC determines who owns a workfile.
2125* Back-end Versions:: How VC determines what release your RCS is.
2126@end menu
2127
2128
2129@node Remote File Ownership
2130@subsection How VC determines who owns a workfile
2131
6b61353c
KH
2132@value{emacs-name} provides the @code{user-full-name} function to
2133return the login name of the current user as well as mapping from
2134arbitrary user id values back to login names. The VC code uses this
2135functionality to map from the uid of the owner of a workfile to the
2136login name in some circumstances.
fb7933a3
KG
2137
2138This will not, for obvious reasons, work if the remote system has a
2139different set of logins. As such, it is necessary to delegate to the
2140remote machine the job of determining the login name associated with a
2141uid.
2142
2143Unfortunately, with the profusion of distributed management systems such
2144as @code{NIS}, @code{NIS+} and @code{NetInfo}, there is no simple,
2145reliable and portable method for performing this mapping.
2146
2147Thankfully, the only place in the VC code that depends on the mapping of
2148a uid to a login name is the @code{vc-file-owner} function. This returns
2149the login of the owner of the file as a string.
2150
2151This function has been advised to use the output of @command{ls} on the
2152remote machine to determine the login name, delegating the problem of
2153mapping the uid to the login to the remote system which should know more
2154about it than I do.
2155
2156
2157@node Back-end Versions
2158@subsection How VC determines what release your RCS is
2159
2160VC needs to know what release your revision control binaries you are
2161running as not all features VC supports are available with older
2162versions of @command{rcs(1)}, @command{cvs(1)} or @command{sccs(1)}.
2163
2164The default implementation of VC determines this value the first time it
2165is needed and then stores the value globally to avoid the overhead of
2166executing a process and parsing its output each time the information is
2167needed.
2168
2169Unfortunately, life is not quite so easy when remote version control
2170comes into the picture. Each remote machine may have a different version
2171of the version control tools and, while this is painful, we need to
2172ensure that unavailable features are not used remotely.
2173
2174To resolve this issue, @tramp{} currently takes the sledgehammer
2175approach of making the release values of the revision control tools
2176local to each @tramp{} buffer, forcing VC to determine these values
2177again each time a new file is visited.
2178
2179This has, quite obviously, some performance implications. Thankfully,
2180most of the common operations performed by VC do not actually require
2181that the remote version be known. This makes the problem far less
2182apparent.
2183
2184Eventually these values will be captured by @tramp{} on a system by
2185system basis and the results cached to improve performance.
2186
2187
884b79ec
KG
2188@node Files directories and localnames
2189@chapter How file names, directories and localnames are mangled and managed.
fb7933a3
KG
2190
2191@menu
884b79ec 2192* Localname deconstruction:: Breaking a localname into its components.
fb7933a3
KG
2193@end menu
2194
2195
884b79ec
KG
2196@node Localname deconstruction
2197@section Breaking a localname into its components.
fb7933a3 2198
884b79ec 2199@tramp{} file names are somewhat different, obviously, to ordinary file
fb7933a3 2200names. As such, the lisp functions @code{file-name-directory} and
884b79ec
KG
2201@code{file-name-nondirectory} are overridden within the @tramp{}
2202package.
fb7933a3
KG
2203
2204Their replacements are reasonably simplistic in their approach. They
884b79ec
KG
2205dissect the filename, call the original handler on the localname and
2206then rebuild the @tramp{} file name with the result.
fb7933a3
KG
2207
2208This allows the platform specific hacks in the original handlers to take
884b79ec 2209effect while preserving the @tramp{} file name information.
fb7933a3
KG
2210
2211
2212@node Issues
2213@chapter Debatable Issues and What Was Decided
2214
2215@itemize @bullet
2216@item The uuencode method does not always work.
2217
2218Due to the design of @tramp{}, the encoding and decoding programs need to
2219read from stdin and write to stdout. On some systems, @code{uudecode -o
2220-} will read stdin and write the decoded file to stdout, on other
2221systems @code{uudecode -p} does the same thing. But some systems have
2222uudecode implementations which cannot do this at all---it is not
2223possible to call these uudecode implementations with suitable parameters
2224so that they write to stdout.
2225
2226Of course, this could be circumvented: the @code{begin foo 644} line
2227could be rewritten to put in some temporary file name, then
2228@code{uudecode} could be called, then the temp file could be printed and
2229deleted.
2230
2231But I have decided that this is too fragile to reliably work, so on some
2232systems you'll have to do without the uuencode methods.
2233
2234@item @tramp{} does not work on XEmacs 20.
2235
2236This is because it requires the macro @code{with-timeout} which does not
2237appear to exist in XEmacs 20. I'm somewhat reluctant to add an
2238emulation macro to @tramp{}, but if somebody who uses XEmacs 20 steps
2239forward and wishes to implement and test it, please contact me or the
2240mailing list.
2241
f37fc5a7
KG
2242@item The @tramp{} filename syntax differs between Emacs and XEmacs.
2243
2244The Emacs maintainers wish to use a unified filename syntax for
2245Ange-FTP and @tramp{} so that users don't have to learn a new
2246syntax. It is sufficient to learn some extensions to the old syntax.
2247
2248For the XEmacs maintainers, the problems caused from using a unified
abc6be8d
KG
2249filename syntax are greater than the gains. The XEmacs package system
2250uses EFS for downloading new packages. So, obviously, EFS has to be
2251installed from the start. If the filenames were unified, @tramp{}
f37fc5a7
KG
2252would have to be installed from the start, too.
2253
6b61353c
KH
2254@ifset xemacs
2255@strong{Note:} If you'ld like to use a similar syntax like
2256@value{ftp-package-name}, you need the following settings in your init
2257file:
2258
2259@lisp
2260(setq tramp-unified-filenames t)
2261(require 'tramp)
2262@end lisp
2263
2264The autoload of the @value{emacs-name} @tramp{} package must be
2265disabled. This can be achieved by setting file permissions @code{000}
2266to the files @file{.../xemacs-packages/lisp/tramp/auto-autoloads.el*}.
2267
2268In case of unified filenames, all @value{emacs-name} download sites
2269are added to @code{tramp-default-method-alist} with default method
2270@code{ftp} @xref{Default Method}. These settings shouldn't be touched
2271for proper working of the @value{emacs-name} package system.
2272
2273The syntax for unified filenames is described in the @tramp{} manual
2274for @value{emacs-other-name}.
2275@end ifset
2276
fb7933a3
KG
2277@end itemize
2278
41bed43c
KG
2279@node Concept Index
2280@comment node-name, next, previous, up
2281@unnumbered Concept Index
2282@printindex cp
2283@contents
fb7933a3
KG
2284@c End of tramp.texi - the TRAMP User Manual
2285@bye
2286
2287@c TODO
2288@c
2289@c * Say something about the .login and .profile files of the remote
2290@c shells.
2291@c * Explain how tramp.el works in principle: open a shell on a remote
2292@c host and then send commands to it.
83fa16cf
KG
2293@c * Mention that bookmarks are a cool feature to go along with Tramp.
2294@c * Make terminology "inline" vs "out-of-band" consistent.
2295@c It seems that "external" is also used instead of "out-of-band".
fb7933a3 2296
16674e4f
KG
2297@c * M. Albinus
2298@c ** Use `filename' resp. `file name' consistently.
2299@c ** Use `host' resp. `machine' consistently.
2300@c ** Consistent small or capitalized words especially in menues.
6b61353c
KH
2301
2302@ignore
2303 arch-tag: f96dd66e-6dd3-4c92-8d77-9c56205ba808
2304@end ignore