Mercurial > emacs
annotate man/tramp.texi @ 46361:a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
author | Kai Großjohann <kgrossjo@eu.uu.net> |
---|---|
date | Sun, 14 Jul 2002 14:06:58 +0000 |
parents | 16e7539f3da5 |
children | 93ea423da06e |
rev | line source |
---|---|
45861 | 1 \input texinfo @c -*-texinfo-*- |
2 @c %**start of header | |
45864 | 3 @setfilename ../info/tramp |
45861 | 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 | |
11 | |
12 @c Entries for @command{install-info} to use | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
13 @dircategory Emacs |
45861 | 14 @direntry |
15 * TRAMP: (tramp). Transparent Remote Access, Multiple Protocol | |
16 Emacs remote file access via rsh and rcp. | |
17 @end direntry | |
18 | |
19 @c Macro to make formatting of the tramp program name consistent. | |
20 @macro tramp | |
21 @sc{tramp} | |
22 @end macro | |
23 | |
24 @c Copying permissions, et al | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
25 @copying |
45861 | 26 This file documents @tramp{}, a remote file editing package for Emacs and |
27 XEmacs. | |
28 | |
46348 | 29 Copyright @copyright{} 1999, 2000, 2001, 2002 Free Software |
30 Foundation, Inc. | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
31 |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
32 @quotation |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
33 Permission is granted to copy, distribute and/or modify this document |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
34 under the terms of the GNU Free Documentation License, Version 1.1 or |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
35 any later version published by the Free Software Foundation; with no |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
36 Invariant Sections, with the Front-Cover texts being ``A GNU |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
37 Manual'', and with the Back-Cover Texts as in (a) below. A copy of the |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
38 license is included in the section entitled ``GNU Free Documentation |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
39 License'' in the Emacs manual. |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
40 |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
41 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
42 this GNU Manual, like GNU software. Copies published by the Free |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
43 Software Foundation raise funds for GNU development.'' |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
44 |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
45 This document is part of a collection distributed under the GNU Free |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
46 Documentation License. If you want to distribute this document |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
47 separately from the collection, you can do so by adding a copy of the |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
48 license to the document, as described in section 6 of the license. |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
49 @end quotation |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
50 @end copying |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
51 |
45861 | 52 |
53 @tex | |
54 | |
55 @titlepage | |
56 @title @tramp{} User Manual | |
57 | |
58 @author by Daniel Pittman | |
59 @author based on documentation by Kai Gro@ss{}johann | |
60 @page | |
61 | |
62 @end titlepage | |
63 @page | |
64 | |
65 @end tex | |
66 | |
67 @ifnottex | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
68 @node Top, Overview, (dir), (dir) |
45861 | 69 @top @tramp{} User Manual |
70 | |
71 @tramp{} stands for `Transparent Remote (file) Access, Multiple | |
72 Protocol'. This package provides remote file editing, similar to | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
73 @cite{Ange-FTP} and @cite{EFS}. |
45861 | 74 |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
75 The difference is that Ange-FTP uses FTP to transfer files between the |
45861 | 76 local and the remote host, whereas @tramp{} uses a combination of |
77 @command{rsh} and @command{rcp} or other work-alike programs, such as | |
78 @command{ssh}/@command{scp}. | |
79 | |
80 You can find the latest version of this document on the web at | |
81 @uref{http://www.freesoftware.fsf.org/tramp/}. | |
82 | |
83 @ifhtml | |
84 This manual is also available as a @uref{tramp_ja.html, Japanese | |
85 translation}. | |
86 | |
87 The latest release of @tramp{} is available for | |
88 @uref{http://savannah.gnu.org/download/tramp/, | |
89 download}, or you may see @ref{Obtaining @tramp{}} for more details, | |
90 including the CVS server details. | |
91 | |
92 @tramp{} also has a @uref{https://savannah.gnu.org/projects/tramp/, | |
93 Savannah Project Page}. | |
94 @end ifhtml | |
95 | |
96 There is a mailing list for @tramp{}, available at | |
97 @email{tramp-devel@@mail.freesoftware.fsf.org}, and archived at | |
98 @uref{http://www.mail-archive.com/emacs-rcp@@ls6.cs.uni-dortmund.de/} as | |
99 well as the usual Savannah archives. | |
100 | |
101 @end ifnottex | |
102 | |
103 @menu | |
104 * Overview:: What @tramp{} can and cannot do. | |
105 | |
106 For the end user: | |
107 * Obtaining @tramp{}:: How to obtain @tramp{}. | |
108 * History:: History of @tramp{} | |
109 * Installation:: Installing @tramp{} with your (X)Emacs. | |
110 * Configuration:: Configuring @tramp{} for use. | |
111 * Usage:: An overview of the operation of @tramp{}. | |
112 * Bug Reports:: Reporting Bugs and Problems | |
113 * Frequently Asked Questions:: Questions and answers from the mailing list. | |
114 | |
115 For the developer: | |
116 * Version Control:: The inner workings of remote version control. | |
117 * Files directories and paths:: How file names, directories and paths are mangled and managed. | |
118 * Issues:: | |
119 | |
120 @detailmenu | |
121 --- The Detailed Node Listing --- | |
122 | |
123 Configuring @tramp{} for use | |
124 | |
125 * Connection types:: Types of connections made to remote machines. | |
126 * Inline methods:: Inline methods. | |
127 * External transfer methods:: External transfer methods. | |
128 * Multi-hop Methods:: Connecting to a remote host using multiple hops. | |
129 * Default Method:: Selecting a default method. | |
130 * Customizing Methods:: Using Non-Standard Methods. | |
131 * Remote Programs:: How @tramp{} finds and uses programs on the remote machine. | |
132 * Remote shell setup:: | |
133 | |
134 Using @tramp | |
135 | |
136 * Filename Syntax:: @tramp{} filename conventions. | |
137 * Multi-hop filename syntax:: Multi-hop filename conventions | |
138 * Dired:: Dired and filename completion. | |
139 | |
140 The inner workings of remote version control | |
141 | |
142 * Version Controlled Files:: Determining if a file is under version control. | |
143 * Remote Commands:: Executing the version control commands on the remote machine. | |
144 * Changed workfiles:: Detecting if the working file has changed. | |
145 * Checking out files:: Bringing the workfile out of the repository. | |
146 * Miscellaneous Version Control:: Things related to Version Control that don't fit elsewhere | |
147 | |
148 Things related to Version Control that don't fit elsewhere | |
149 | |
150 * Remote File Ownership:: How VC determines who owns a workfile. | |
151 * Back-end Versions:: How VC determines what release your RCS is. | |
152 | |
153 How file names, directories and paths are mangled and managed. | |
154 | |
155 * Path deconstruction:: Breaking a path into its components. | |
156 | |
157 @end detailmenu | |
158 @end menu | |
159 | |
160 | |
161 @node Overview | |
162 @chapter An overview of @tramp | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
163 @cindex overview |
45861 | 164 |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
165 After the installation of @tramp{} into your Emacs, you will be able |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
166 to access files on remote machines as though they were local. Access |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
167 to the remote file system for editing files, version control, and |
45861 | 168 @command{dired} are transparently enabled. |
169 | |
170 Your access to the remote machine can be with the @command{rsh}, | |
171 @command{rlogin}, @command{telnet} programs or with any similar | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
172 connection method. This connection must pass ASCII successfully to be |
45861 | 173 usable but need not be 8-bit clean. |
174 | |
175 The package provides support for @command{ssh} connections out of the | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
176 box, one of the more common uses of the package. This allows |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
177 relatively secure access to machines, especially if @command{ftp} |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
178 access is disabled. |
45861 | 179 |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
180 The majority of activity carried out by @tramp{} requires only that |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
181 the remote login is possible and is carried out at the terminal. In |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
182 order to access remote files @tramp{} needs to transfer their content |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
183 to the local machine temporarily. |
45861 | 184 |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
185 @tramp{} can transfer files between the machines in a variety of ways. |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
186 The details are easy to select, depending on your needs and the |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
187 machines in question. |
45861 | 188 |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
189 The fastest transfer methods (for large files) rely on a remote file |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
190 transfer package such as @command{rcp}, @command{scp} or |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
191 @command{rsync}. The use of these methods is only possible if the |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
192 file copy command does not ask for a password for the remote machine. |
45861 | 193 |
194 If the remote copy methods are not suitable for you, @tramp{} also | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
195 supports the use of encoded transfers directly through the shell. |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
196 This requires that the @command{mimencode} or @command{uuencode} tools |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
197 are available on the remote machine. These methods are generally |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
198 faster for small files. |
45861 | 199 |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
200 Within these limitations, @tramp{} is quite powerful. It is worth |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
201 noting that, as of the time of writing, it is far from a polished |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
202 end-user product. For a while yet you should expect to run into rough |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
203 edges and problems with the code now and then. |
45861 | 204 |
205 It is finished enough that the developers use it for day to day work but | |
206 the installation and setup can be a little difficult to master, as can | |
207 the terminology. | |
208 | |
209 @tramp{} is still under active development and any problems you encounter, | |
210 trivial or major, should be reported to the @tramp{} developers. | |
211 @xref{Bug Reports}. | |
212 | |
213 | |
214 @subsubheading Behind the scenes | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
215 @cindex behind the scenes |
45861 | 216 |
217 This section tries to explain what goes on behind the scenes when you | |
218 access a remote file through @tramp{}. | |
219 | |
220 Suppose you type @kbd{C-x C-f} and enter part of an @tramp{} file name, | |
221 then hit @kbd{@key{TAB}} for completion. Suppose further that this is | |
222 the first time that @tramp{} is invoked for the host in question. Here's | |
223 what happens: | |
224 | |
225 @itemize | |
226 @item | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
227 @tramp{} discovers that it needs a connection to the host. So it |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
228 invokes @samp{telnet @var{host}} or @samp{rsh @var{host} -l |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
229 @var{user}} or a similar tool to connect to the remote host. |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
230 Communication with this process happens through an Emacs buffer, that |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
231 is, the output from the remote end goes into a buffer. |
45861 | 232 |
233 @item | |
234 The remote host may prompt for a login name (for @command{telnet}). The | |
235 login name is given in the file name, so @tramp{} sends the login name and | |
236 a newline. | |
237 | |
238 @item | |
239 The remote host may prompt for a password or pass phrase (for | |
240 @command{rsh} or for @command{telnet} after sending the login name). | |
241 @tramp{} displays the prompt in the minibuffer, asking you for the | |
242 password or pass phrase. | |
243 | |
244 You enter the password or pass phrase. @tramp{} sends it to the remote | |
245 host, followed by a newline. | |
246 | |
247 @item | |
248 @tramp{} now waits for the shell prompt or for a message that the login | |
249 failed. | |
250 | |
251 If @tramp{} sees neither of them after a certain period of time (a minute, | |
252 say), then it issues an error message saying that it couldn't find the | |
253 remote shell prompt and shows you what the remote host has sent. | |
254 | |
255 If @tramp{} sees a `login failed' message, it tells you so, aborts the | |
256 login attempt and allows you to try again. | |
257 | |
258 @item | |
259 Suppose that the login was successful and @tramp{} sees the shell prompt | |
260 from the remote host. Now @tramp{} invokes @command{/bin/sh} because | |
261 Bourne shells and C shells have different command | |
262 syntaxes.@footnote{Invoking @command{/bin/sh} will fail if your login | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
263 shell doesn't recognize @samp{exec /bin/sh} as a valid command. |
45861 | 264 Maybe you use the Scheme shell @command{scsh}@dots{}} |
265 | |
266 After the Bourne shell has come up, @tramp{} sends a few commands to | |
267 ensure a good working environment. It turns off echoing, it sets the | |
268 shell prompt, and a few other things. | |
269 | |
270 @item | |
271 Now the remote shell is up and it good working order. Remember, what | |
272 was supposed to happen is that @tramp{} tries to find out what files exist | |
273 on the remote host so that it can do filename completion. | |
274 | |
275 So, @tramp{} basically issues @command{cd} and @command{ls} commands and | |
276 also sometimes @command{echo} with globbing. Another command that is | |
277 often used is @command{test} to find out whether a file is writable or a | |
278 directory or the like. The output of each command is parsed for the | |
279 necessary operation. | |
280 | |
281 @item | |
282 Suppose you are finished with filename completion, have entered @kbd{C-x | |
283 C-f}, a full file name and hit @kbd{@key{RET}}. Now comes the time to | |
284 transfer the file contents from the remote host to the local host so | |
285 that you can edit them. | |
286 | |
287 See above for an explanation of how @tramp{} transfers the file contents. | |
288 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
289 For inline transfers, @tramp{} issues a command like @samp{mimencode -b |
45861 | 290 /path/to/remote/file}, waits until the output has accumulated in the |
291 buffer that's used for communication, then decodes that output to | |
292 produce the file contents. | |
293 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
294 For out-of-band transfers, @tramp{} issues a command like @samp{rcp |
45861 | 295 user@@host:/path/to/remote/file /tmp/tramp.4711} and then reads the local |
296 temporary file @file{/tmp/tramp.4711} into a buffer and deletes the | |
297 temporary file. | |
298 | |
299 @item | |
300 You now edit the buffer contents, blithely unaware of what has happened | |
301 behind the scenes. (Unless you have read this section, that is.) When | |
302 you are finished, you type @kbd{C-x C-s} to save the buffer. | |
303 | |
304 @item | |
305 Again, @tramp{} transfers the file contents to the remote host either | |
306 inline or out-of-band. This is the reverse of what happens when reading | |
307 the file. | |
308 | |
309 @end itemize | |
310 | |
311 I hope this has provided you with a basic overview of what happens | |
312 behind the scenes when you open a file with @tramp{}. | |
313 | |
314 | |
315 @c For the end user | |
316 @node Obtaining @tramp{} | |
317 @chapter Obtaining @tramp{}. | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
318 @cindex obtaining Tramp |
45861 | 319 |
320 @tramp{} is freely available on the Internet and the latest release may be | |
321 downloaded from | |
322 @uref{ftp://ls6-ftp.cs.uni-dortmund.de/pub/src/emacs/tramp.tar.gz}. This | |
323 release includes the full documentation and code for @tramp{}, suitable | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
324 for installation. But Emacs (21.4 or later) includes @tramp{} |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
325 already, and there is a @tramp{} package for XEmacs, as well. So |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
326 maybe it is easier to just use those. But if you want the bleeding |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
327 edge, read on@dots{...} |
45861 | 328 |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
329 For the especially brave, @tramp{} is available from CVS. The CVS version |
45861 | 330 is the latest version of the code and may contain incomplete features or |
331 new issues. Use these versions at your own risk. | |
332 | |
333 Instructions for obtaining the latest development version of @tramp{} | |
334 from CVS can be found by going to the Savannah project page at | |
335 @uref{http://savannah.gnu.org/projects/tramp/} and then clicking on the | |
336 CVS link in the navigation bar at the top. Or follow the example | |
337 session below: | |
338 | |
339 @example | |
340 ] @strong{cd ~/lisp} | |
341 ] @strong{cvs -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/tramp login} | |
342 | |
343 (Logging in to anoncvs@@subversions.gnu.org) | |
344 CVS password: @strong{(just hit RET here)} | |
345 @dots{} | |
346 | |
347 ] @strong{cvs -z3 -d:pserver:anoncvs@@subversions.gnu.org:/cvsroot/tramp co tramp} | |
348 @end example | |
349 | |
350 You should now have a directory @file{~/lisp/tramp} containing the latest | |
351 version of @tramp{}. You can fetch the latest updates from the repository | |
352 by issuing the command: | |
353 | |
354 @example | |
355 ] @strong{cd ~/lisp/tramp} | |
356 ] @strong{cvs update -d} | |
357 @end example | |
358 | |
359 | |
360 @node History | |
361 @chapter History of @tramp{} | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
362 @cindex history |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
363 @cindex development history |
45861 | 364 |
365 Development was started end of November 1998. The package was called | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
366 @file{rssh.el}, back then. It only provided one method to access a |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
367 file, using @command{ssh} to log in to a remote host and using |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
368 @command{scp} to transfer the file contents. After a while, the name |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
369 was changed to @file{rcp.el}, and now it's @tramp{}. Along the way, |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
370 many more methods for getting a remote shell and for transferring the |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
371 file contents were added. Support for VC was added. |
45861 | 372 |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
373 The most recent addition of major features were the multi-hop methods |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
374 added in April 2000 and the unification of @tramp{} and Ange-FTP |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
375 filenames in July 2002. |
45861 | 376 |
377 | |
378 @node Installation | |
379 @chapter Installing @tramp{} into Emacs or XEmacs | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
380 @cindex installation |
45861 | 381 |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
382 If you use the version that comes with your Emacs or the XEmacs |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
383 package, the following information is not necessary. Installing |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
384 @tramp{} into your Emacs or XEmacs is a relatively easy process, at |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
385 least compared to rebuilding your machine from scratch. ;) |
45861 | 386 |
387 Seriously though, the installation should be a fairly simple matter. | |
388 | |
389 The easiest way to proceed is as follows: | |
390 | |
391 @itemize | |
392 @item | |
393 Choose a directory, say @file{~/emacs/}. Change into that directory and | |
394 unpack the tarball. This will give you a directory | |
395 @file{~/emacs/tramp/} which contains subdirectories @file{lisp} for the | |
396 Lisp code and @file{texi} for the documentation. | |
397 | |
398 @item | |
399 Optionally byte-compile all files in the Lisp directory, | |
400 @file{~/emacs/tramp/lisp/}, by issuing a command like the following from | |
401 the top level directory @file{~/emacs/tramp/}: | |
402 @example | |
403 make EMACS=emacs all # for Emacs users | |
404 make EMACS=xemacs all # for XEmacs users | |
405 @end example | |
406 | |
407 @item | |
408 NOTE: | |
409 @example | |
410 If you run into problems running the example @command{make} | |
411 commands, don't dispare. You can still byte compile the | |
412 @file{*.el} files by opening emacs in @command{dired} | |
413 (@command{C-x d}) mode, at @file{~/tramp/lisp}. Mark the lisp | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
414 files with @kbd{m}, then press @kbd{B} to byte compile |
45861 | 415 your selections. |
416 | |
417 Something similar can be done to create the info manual. | |
418 Just cd to @file{~/emacs/tramp/texi} and load the @file{tramp.texi} | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
419 file in emacs. Then press @kbd{M-x makeinfo-buffer <RET>} |
45861 | 420 to generate @file{tramp.info}. |
421 @end example | |
422 | |
423 @item | |
424 Tell Emacs about the new Lisp directory and the @tramp{} package | |
425 with the following lines in @file{~/.emacs}: | |
426 @lisp | |
427 (add-to-list 'load-path "~/emacs/tramp/lisp/") | |
428 (require 'tramp) | |
429 @end lisp | |
430 | |
431 @item | |
432 To be able to read the Info documentation, create a file | |
433 @file{~/emacs/tramp/texi/dir} using for example the | |
434 @command{install-info} command, and add the directory to the search | |
435 path for Info. | |
436 | |
437 @item | |
438 NOTE: | |
439 @example | |
440 On systems using `gnu' @command{install-info}, the | |
441 @command{install-info} syntax is very direct and simple. One can | |
442 cd to @file{~/emacs/tramp/texi} and type: | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
443 @kbd{install-info tramp.info dir} |
45861 | 444 and a @file{dir} file will be created with the @tramp{} |
445 entry. The info reader will know how to interpret it, but must | |
446 be told where to find it (see below). If you want anything fancier | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
447 you'll need to look through @kbd{man install-info}. |
45861 | 448 |
449 Debian gnu/linux doesn't default to `gnu' @command{install-info} and | |
450 uses its own version. This version does not create a @file{dir} file | |
451 for you from scratch. You must provide a skeleton dir file it | |
452 recognizes. One can be found in a default install at | |
453 @file{/usr/info/dir}. Copy the top of this file down to the first | |
454 occurrence of `* Menu' including that line plus one more blank line, | |
455 to your working directory @file{texi/dir}, or use the sample provided | |
456 in the @file{texi} directroy of this distribution. See | |
457 @file{texi/dir_sample} | |
458 | |
459 Once a @file{dir} file is in place, this command will make the entry. | |
460 install-info --infodir=. tramp.info | |
461 If you want it in a specific category | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
462 (see @kbd{man install-info} for further details) |
45861 | 463 @end example |
464 | |
465 If the environment variable @env{INFOPATH} is set, add the directory | |
466 @file{~/emacs/tramp/texi/} to it. Else, add the directory to | |
467 @code{Info-default-directory-list}, as follows: | |
468 @lisp | |
469 (add-to-list 'Info-default-directory-list "~/emacs/tramp/texi/") | |
470 @end lisp | |
471 XEmacs 21 users should use @code{Info-directory-list} rather than | |
472 @code{Info-default-directory-list}. | |
473 | |
474 @end itemize | |
475 | |
476 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
477 For XEmacs users, the package @file{fsf-compat} must be installed. |
45861 | 478 For details on package installation, see @ref{Packages, , ,xemacs}. |
479 @ifhtml | |
480 (If the previous link doesn't work, try the XEmacs documentation at | |
481 @uref{http://www.xemacs.org/Documentation/packageGuide.html,the XEmacs | |
482 site}.) | |
483 @end ifhtml | |
484 | |
485 @node Configuration | |
486 @chapter Configuring @tramp{} for use | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
487 @cindex configuration |
45861 | 488 |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
489 @cindex default configuration |
45861 | 490 @tramp{} is (normally) fully functional when it is initially |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
491 installed. It is initially configured to use the @command{sh} program |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
492 to connect to the remote host and to use base-64 encoding (on the |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
493 remote host, via @command{mimencode}, and on the local host via the |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
494 built-in support for base-64 encoding in Emacs). |
45861 | 495 |
496 On some hosts, there are problems with opening a connection. These are | |
497 related to the behavior of the remote shell. See @xref{Remote shell | |
498 setup}, for details on this. | |
499 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
500 If you do not wish to use these commands to connect to the remote |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
501 host, you should change the default connection and transfer method |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
502 that @tramp uses. There are several different methods that @tramp{} |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
503 can use to connect to remote machines and transfer files |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
504 (@pxref{Connection types}). |
45861 | 505 |
506 | |
507 @menu | |
508 * Connection types:: Types of connections made to remote machines. | |
509 * Inline methods:: Inline methods. | |
510 * External transfer methods:: External transfer methods. | |
511 * Multi-hop Methods:: Connecting to a remote host using multiple hops. | |
512 * Default Method:: Selecting a default method. | |
513 * Customizing Methods:: Using Non-Standard Methods. | |
514 * Remote Programs:: How @tramp{} finds and uses programs on the remote machine. | |
515 * Remote shell setup:: Remote shell setup hints. | |
516 * Windows setup hints:: Issues with Cygwin ssh. | |
517 @end menu | |
518 | |
519 | |
520 @node Connection types | |
521 @section Types of connections made to remote machines. | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
522 @cindex connection types, overview |
45861 | 523 |
524 There are two basic types of transfer methods, each with its own | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
525 advantages and limitations. Both types of connection make use of a |
45861 | 526 remote shell access program such as @command{rsh}, @command{ssh} or |
527 @command{telnet} to connect to the remote machine. | |
528 | |
529 This connection is used to perform many of the operations that @tramp | |
530 requires to make the remote file system transparently accessible from | |
531 the local machine. It is only when visiting files that the methods | |
532 differ. | |
533 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
534 @cindex inline methods |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
535 @cindex external transfer methods |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
536 @cindex external methods |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
537 @cindex out-of-band methods |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
538 @cindex methods, inline |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
539 @cindex methods, external transfer |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
540 @cindex methods, out-of-band |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
541 Loading or saving a remote file requires that the content of the file |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
542 be transfered between the two machines. The content of the file can be |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
543 transfered over the same connection used to log in to the remote |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
544 machine or the file can be transfered through another connection using |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
545 a remote copy program such as @command{rcp}, @command{scp} or |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
546 @command{rsync}. The former are called @dfn{inline methods}, the |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
547 latter are called @dfn{out-of-band methods} or @dfn{external transfer |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
548 methods} (@dfn{external methods} for short). |
45861 | 549 |
550 The performance of the external transfer methods is generally better | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
551 than that of the inline methods, at least for large files. This is |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
552 caused by the need to encode and decode the data when transferring |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
553 inline. |
45861 | 554 |
555 The one exception to this rule are the @command{scp} based transfer | |
556 methods. While these methods do see better performance when actually | |
557 transferring files, the overhead of the cryptographic negotiation at | |
558 startup may drown out the improvement in file transfer times. | |
559 | |
560 External transfer methods do require that the remote copy command is not | |
561 interactive --- that is, the command does not prompt you for a password. | |
562 If you cannot perform remote copies without a password, you will need to | |
563 use an inline transfer method to work with @tramp{}. | |
564 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
565 @cindex multi-hop methods |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
566 @cindex methods, multi-hop |
45861 | 567 A variant of the inline methods are the @dfn{multi-hop methods}. |
568 These methods allow you to connect a remote host using a number `hops', | |
569 each of which connects to a different host. This is useful if you are | |
570 in a secured network where you need to go through a bastion host to | |
571 connect to the outside world. | |
572 | |
573 | |
574 @node Inline methods | |
575 @section Inline methods | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
576 @cindex inline methods |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
577 @cindex methods, inline |
45861 | 578 |
579 The inline methods in @tramp{} are quite powerful and can work in | |
580 situations where you cannot use an external transfer program to connect. | |
581 Inline methods are the only methods that work when connecting to the | |
582 remote machine via telnet. (There are also strange inline methods which | |
583 allow you to transfer files between @emph{user identities} rather than | |
584 hosts, see below.) | |
585 | |
586 These methods depend on the existence of a suitable encoding and | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
587 decoding command on remote machine. Locally, @tramp{} may be able to use |
45861 | 588 features of Emacs to decode and encode the files or it may require |
589 access to external commands to perform that task. | |
590 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
591 @cindex uuencode |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
592 @tramp{} supports the use of @command{uuencode} to transfer files. |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
593 This is @emph{not} recommended. The @command{uuencode} and |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
594 @command{uudecode} commands are not well standardized and may not |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
595 function correctly or at all on some machines, notably AIX and IRIX. |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
596 These systems do not work with @command{uuencode} at all. (But do see |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
597 the note about AIX in the documentation for @var{tramp-methods}.) |
45861 | 598 |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
599 @cindex mimencode |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
600 @cindex base-64 encoding |
45861 | 601 In summary, if possible use the @command{mimencode} methods to transfer |
602 the data base64 encoded. This has the advantage of using a built-in | |
603 command in every modern Emacs, improving performance. | |
604 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
605 @table @asis |
45861 | 606 @item @option{rm} --- @command{rsh} with @command{mimencode} |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
607 @cindex method rm |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
608 @cindex rm method |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
609 @cindex method using rsh |
45861 | 610 |
611 Connect to the remote host with @command{rsh} and use base64 encoding to | |
612 transfer files between the machines. | |
613 | |
614 This requires the @command{mimencode} command that is part of the | |
615 @command{metamail} packages. This may not be installed on all remote | |
616 machines. | |
617 | |
618 | |
619 @item @option{sm} --- @command{ssh} with @command{mimencode} | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
620 @cindex method sm |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
621 @cindex sm method |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
622 @cindex method using ssh |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
623 @cindex ssh |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
624 @cindex mimencode |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
625 @cindex base-64 encoding |
45861 | 626 |
627 Connect to the remote host with @command{ssh} and use base64 encoding to | |
628 transfer files between the machines. | |
629 | |
630 This is identical to the previous option except that the @command{ssh} | |
631 package is used, making the connection more secure. | |
632 | |
633 There are also two variants, @option{sm1} and @option{sm2} that use the | |
634 @command{ssh1} and @command{ssh2} commands explicitly. If you don't know | |
635 what these are, you do not need these options. | |
636 | |
46010
d07b0e5f80b9
(tramp-open-connection-rsh): Support a kludgy feature for the
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
45979
diff
changeset
|
637 All the methods based on @command{ssh} have an additional kludgy |
d07b0e5f80b9
(tramp-open-connection-rsh): Support a kludgy feature for the
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
45979
diff
changeset
|
638 feature: you can specify a host name which looks like @file{host#42} |
d07b0e5f80b9
(tramp-open-connection-rsh): Support a kludgy feature for the
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
45979
diff
changeset
|
639 (the real host name, then a hash sign, then a port number). This |
d07b0e5f80b9
(tramp-open-connection-rsh): Support a kludgy feature for the
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
45979
diff
changeset
|
640 means to connect to the given host but to also pass @code{-p 42} as |
d07b0e5f80b9
(tramp-open-connection-rsh): Support a kludgy feature for the
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
45979
diff
changeset
|
641 arguments to the @command{ssh} command. |
d07b0e5f80b9
(tramp-open-connection-rsh): Support a kludgy feature for the
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
45979
diff
changeset
|
642 |
45861 | 643 |
644 @item @option{tm} --- @command{telnet} with @command{mimencode} | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
645 @cindex method tm |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
646 @cindex tm method |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
647 @cindex method using telnet |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
648 @cindex telnet |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
649 @cindex mimencode |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
650 @cindex base-64 encoding |
45861 | 651 |
652 Connect to the remote host with @command{telnet} and use base64 encoding | |
653 to transfer files between the machines. | |
654 | |
655 This requires the @command{mimencode} command that is part of the | |
656 @command{metamail} packages. | |
657 | |
658 | |
659 @item @option{ru} --- @command{rsh} with @command{uuencode} | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
660 @cindex method ru |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
661 @cindex ru method |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
662 @cindex method using rsh |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
663 @cindex rsh |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
664 @cindex uuencode |
45861 | 665 |
666 Connect to the remote host with @command{rsh} and use the | |
667 @command{uuencode} and @command{uudecode} commands to transfer files | |
668 between the machines. | |
669 | |
670 | |
671 @item @option{su} --- @command{ssh} with @command{uuencode} | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
672 @cindex method su |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
673 @cindex su method |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
674 @cindex method using ssh |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
675 @cindex ssh |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
676 @cindex uuencode |
45861 | 677 |
678 Connect to the remote host with @command{ssh} and use the | |
679 @command{uuencode} and @command{uudecode} commands to transfer files | |
680 between the machines. | |
681 | |
46010
d07b0e5f80b9
(tramp-open-connection-rsh): Support a kludgy feature for the
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
45979
diff
changeset
|
682 As with the @command{ssh} and base64 option (@option{sm}) above, this |
d07b0e5f80b9
(tramp-open-connection-rsh): Support a kludgy feature for the
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
45979
diff
changeset
|
683 provides the @option{su1} and @option{su2} methods to explicitly |
d07b0e5f80b9
(tramp-open-connection-rsh): Support a kludgy feature for the
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
45979
diff
changeset
|
684 select an ssh version. |
45861 | 685 |
686 Note that this method does not invoke the @command{su} program, see | |
687 below for methods which use that. | |
688 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
689 This supports the @samp{-p} kludge. |
46010
d07b0e5f80b9
(tramp-open-connection-rsh): Support a kludgy feature for the
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
45979
diff
changeset
|
690 |
45861 | 691 |
692 @item @option{tu} --- @command{telnet} with @command{uuencode} | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
693 @cindex tu method |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
694 @cindex method tu |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
695 @cindex method using telnet |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
696 @cindex telnet |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
697 @cindex uuencode |
45861 | 698 |
699 Connect to the remote host with @command{telnet} and use the | |
700 @command{uuencode} and @command{uudecode} commands to transfer files | |
701 between the machines. | |
702 | |
703 | |
704 @item @option{sum} --- @command{su} with @command{mimencode} | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
705 @cindex method sum |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
706 @cindex sum method |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
707 @cindex method using su |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
708 @cindex su |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
709 @cindex mimencode |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
710 @cindex base-64 encoding |
45861 | 711 |
712 This method does not connect to a remote host at all, rather it uses the | |
713 @command{su} program to allow you to edit files as another user. Uses | |
714 base64 encoding to transfer the file contents. | |
715 | |
716 | |
717 @item @option{suu} --- @command{su} with @command{uuencode} | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
718 @cindex method suu |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
719 @cindex suu method |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
720 @cindex method using su |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
721 @cindex su |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
722 @cindex uuencode |
45861 | 723 |
724 Like @option{sum}, this uses the @command{su} program to allow you to | |
725 edit files on the local host as another user. Uses @command{uuencode} | |
726 and @command{uudecode} to transfer the file contents. | |
727 | |
728 | |
729 @item @option{sudm} --- @command{sudo} with @command{mimencode} | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
730 @cindex method sudm |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
731 @cindex sudm method |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
732 @cindex method using sudo |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
733 @cindex sudo |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
734 @cindex mimencode |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
735 @cindex base-64 encoding |
45861 | 736 |
737 This is similar to the @option{sum} method, but it uses @command{sudo} | |
738 rather than @command{su} to become a different user. | |
739 | |
740 Note that @command{sudo} must be configured to allow you to start a | |
741 shell as the user. It would be nice if it was sufficient if | |
742 @command{ls} and @command{mimencode} were allowed, but that is not easy | |
743 to implement, so I haven't got around to it, yet. | |
744 | |
745 | |
746 @item @option{sudu} --- @command{sudo} with @command{uuencode} | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
747 @cindex method sudu |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
748 @cindex sudu method |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
749 @cindex method using sudo |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
750 @cindex sudo |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
751 @cindex uuencode |
45861 | 752 |
753 This is similar to the @option{suu} method, but it uses @command{sudo} | |
754 rather than @command{su} to become a different user. | |
755 | |
756 | |
757 @item @option{smx} --- @command{ssh} with @command{mimencode} | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
758 @cindex method smx |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
759 @cindex smx method |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
760 @cindex method using ssh |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
761 @cindex ssh |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
762 @cindex mimencode |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
763 @cindex base-64 encoding |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
764 @cindex Cygwin |
45861 | 765 |
766 As you expect, this is similar to @option{sm}, only a little | |
767 different. Whereas @option{sm} opens a normal interactive shell on | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
768 the remote host, this option uses @samp{ssh -t -t @var{host} -l |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
769 @var{user} /bin/sh} tp open a connection. This is useful for users |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
770 where the normal login shell is set up to ask them a number of |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
771 questions when logging in. This procedure avoids these questions, and |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
772 just gives @tramp{} a more-or-less `standard' login shell to work |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
773 with. |
45861 | 774 |
46346
49f06e689a20
* files.texi (Remote Files): Explain new unified file name synatx.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46010
diff
changeset
|
775 Note that this procedure does not eliminate questions asked by |
49f06e689a20
* files.texi (Remote Files): Explain new unified file name synatx.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46010
diff
changeset
|
776 @command{ssh} itself. For example, @command{ssh} might ask ``Are you |
49f06e689a20
* files.texi (Remote Files): Explain new unified file name synatx.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46010
diff
changeset
|
777 sure you want to continue connecting?'' if the host key of the remote |
49f06e689a20
* files.texi (Remote Files): Explain new unified file name synatx.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46010
diff
changeset
|
778 host is not known. Tramp does not know how to deal with such a |
49f06e689a20
* files.texi (Remote Files): Explain new unified file name synatx.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46010
diff
changeset
|
779 question (yet), therefore you will need to make sure that you can log |
49f06e689a20
* files.texi (Remote Files): Explain new unified file name synatx.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46010
diff
changeset
|
780 in without such questions. |
49f06e689a20
* files.texi (Remote Files): Explain new unified file name synatx.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46010
diff
changeset
|
781 |
45861 | 782 This is also useful for Windows users where @command{ssh}, when |
783 invoked from an Emacs buffer, tells them that it is not allocating a | |
784 pseudo tty. When this happens, the login shell is wont to not print | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
785 any shell prompt, which confuses @tramp{} mightily. For reasons |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
786 unknown, some Windows ports for @command{ssh} (maybe the Cygwin one) |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
787 require the doubled @samp{-t} option. |
45861 | 788 |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
789 This supports the @samp{-p} kludge. |
46010
d07b0e5f80b9
(tramp-open-connection-rsh): Support a kludgy feature for the
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
45979
diff
changeset
|
790 |
45861 | 791 |
792 @item @option{km} --- @command{krlogin} with @command{mimencode} | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
793 @cindex method km |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
794 @cindex km method |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
795 @cindex krlogin |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
796 @cindex Kerberos |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
797 @cindex mimencode |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
798 @cindex base-64 encoding |
45861 | 799 |
800 This method is also similar to @option{sm}. It only uses the | |
801 @command{krlogin -x} command to log in to the remote host. | |
802 | |
803 | |
804 @item @option{plinku} --- @command{plink} with @command{uuencode} | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
805 @cindex method plinku |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
806 @cindex plinku method |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
807 @cindex method using plink |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
808 @cindex plink |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
809 @cindex uuencode |
45861 | 810 |
811 This method is mostly interesting for Windows users using the PuTTY | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
812 implementation of SSH. It uses @samp{plink -ssh} to log in to the |
45861 | 813 remote host. |
814 | |
815 CCC: Do we have to connect to the remote host once from the command | |
816 line to accept the SSH key? Maybe this can be made automatic? | |
817 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
818 CCC: Does @command{plink} support the @samp{-p} option? Tramp |
46010
d07b0e5f80b9
(tramp-open-connection-rsh): Support a kludgy feature for the
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
45979
diff
changeset
|
819 will support that, anyway. |
d07b0e5f80b9
(tramp-open-connection-rsh): Support a kludgy feature for the
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
45979
diff
changeset
|
820 |
45861 | 821 @item @option{plinkm} --- @command{plink} with @command{mimencode} |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
822 @cindex method plinkm |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
823 @cindex plinkm method |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
824 @cindex method using plink |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
825 @cindex plink |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
826 @cindex mimencode |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
827 @cindex base-64 encoding |
45861 | 828 |
829 Like @option{plinku}, but uses base64 encoding instead of uu encoding. | |
830 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
831 @end table |
45861 | 832 |
833 | |
834 | |
835 @node External transfer methods | |
836 @section External transfer methods | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
837 @cindex methods, external transfer |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
838 @cindex methods, out-of-band |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
839 @cindex external transfer methods |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
840 @cindex out-of-band methods |
45861 | 841 |
842 The external transfer methods operate through multiple channels, using | |
843 the remote shell connection for many actions while delegating file | |
844 transfers to an external transfer utility. | |
845 | |
846 This saves the overhead of encoding and decoding that multiplexing the | |
847 transfer through the one connection has with the inline methods. | |
848 | |
849 If you want to use an external transfer method you @emph{must} be able | |
850 to execute the transfer utility to copy files to and from the remote | |
851 machine without any interaction. | |
852 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
853 @cindex ssh-agent |
45861 | 854 This means that you will need to use @command{ssh-agent} if you use the |
855 @command{scp} program for transfers, or maybe your version of | |
856 @command{scp} accepts a password on the command line.@footnote{PuTTY's | |
857 @command{pscp} allows you to specify the password on the command line.} | |
858 If you use @command{rsync} via @command{ssh} then the same rule must | |
859 apply to that connection. | |
860 | |
861 If you cannot get @command{scp} to run without asking for a password but | |
862 would still like to use @command{ssh} to secure your connection, have a | |
863 look at the @command{ssh} based inline methods. | |
864 | |
865 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
866 @table @asis |
45861 | 867 @item @option{rcp} --- @command{rsh} and @command{rcp} |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
868 @cindex method rcp |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
869 @cindex rcp method |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
870 @cindex rcp |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
871 @cindex rsh |
45861 | 872 |
873 This method uses the @command{rsh} and @command{rcp} commands to connect | |
874 to the remote machine and transfer files. This is probably the fastest | |
875 connection method available. | |
876 | |
877 | |
878 @item @option{scp} --- @command{ssh} and @command{scp} | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
879 @cindex method scp |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
880 @cindex scp method |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
881 @cindex scp |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
882 @cindex ssh |
45861 | 883 |
884 Using @command{ssh} to connect to the remote host and @command{scp} to | |
885 transfer files between the machines is the best method for securely | |
886 connecting to a remote machine and accessing files. | |
887 | |
888 The performance of this option is also quite good. It may be slower than | |
889 the inline methods when you often open and close small files however. | |
890 The cost of the cryptographic handshake at the start of an @command{scp} | |
891 session can begin to absorb the advantage that the lack of encoding and | |
892 decoding presents. | |
893 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
894 All the @command{ssh} based methods support the kludgy @samp{-p} |
46010
d07b0e5f80b9
(tramp-open-connection-rsh): Support a kludgy feature for the
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
45979
diff
changeset
|
895 feature where you can specify a port number to connect to in the host |
d07b0e5f80b9
(tramp-open-connection-rsh): Support a kludgy feature for the
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
45979
diff
changeset
|
896 name. For example, the host name @file{host#42} tells Tramp to |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
897 specify @samp{-p 42} in the argument list for @command{ssh}. |
46010
d07b0e5f80b9
(tramp-open-connection-rsh): Support a kludgy feature for the
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
45979
diff
changeset
|
898 |
45861 | 899 |
900 @item @option{rsync} --- @command{ssh} and @command{rsync} | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
901 @cindex method rsync |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
902 @cindex rsync method |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
903 @cindex rsync |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
904 @cindex ssh |
45861 | 905 |
906 Using the @command{ssh} command to connect securely to the remote | |
907 machine and the @command{rsync} command to transfer files is almost | |
908 identical to the @option{scp} method. | |
909 | |
910 While @command{rsync} performs much better than @command{scp} when | |
911 transferring files that exist on both hosts, this advantage is lost if | |
912 the file exists only on one side of the connection. | |
913 | |
914 The @command{rsync} based method may be considerably faster than the | |
915 @command{rcp} based methods when writing to the remote system. Reading | |
916 files to the local machine is no faster than with a direct copy. | |
917 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
918 This method supports the @samp{-p} hack. |
46010
d07b0e5f80b9
(tramp-open-connection-rsh): Support a kludgy feature for the
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
45979
diff
changeset
|
919 |
45861 | 920 |
921 @item @option{scpx} --- @command{ssh} and @command{scp} | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
922 @cindex method scpx |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
923 @cindex scpx method |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
924 @cindex scp |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
925 @cindex ssh |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
926 @cindex Cygwin |
45861 | 927 |
928 As you expect, this is similar to @option{scp}, only a little | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
929 different. Whereas @option{scp} opens a normal interactive shell on |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
930 the remote host, this option uses @samp{ssh -t -t @var{host} -l |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
931 @var{user} /bin/sh} to open a connection. This is useful for users |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
932 where the normal login shell is set up to ask them a number of |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
933 questions when logging in. This procedure avoids these questions, and |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
934 just gives @tramp{} a more-or-less `standard' login shell to work |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
935 with. |
45861 | 936 |
937 This is also useful for Windows users where @command{ssh}, when | |
938 invoked from an Emacs buffer, tells them that it is not allocating a | |
939 pseudo tty. When this happens, the login shell is wont to not print | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
940 any shell prompt, which confuses @tramp{} mightily. Maybe this |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
941 applies to the Cygwin port of SSH. |
45861 | 942 |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
943 This method supports the @samp{-p} hack. |
46010
d07b0e5f80b9
(tramp-open-connection-rsh): Support a kludgy feature for the
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
45979
diff
changeset
|
944 |
45861 | 945 |
946 @item @option{pscp} --- @command{plink} and @command{pscp} | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
947 @cindex method pscp |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
948 @cindex pscp method |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
949 @cindex pscp |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
950 @cindex plink |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
951 @cindex PuTTY |
45861 | 952 |
953 This method is similar to @option{scp}, but it uses the | |
954 @command{plink} command to connect to the remote host, and it uses | |
955 @command{pscp} for transferring the files. These programs are part | |
956 of PuTTY, an SSH implementation for Windows. | |
957 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
958 CCC: Does @command{plink} support the @samp{-p} hack? |
46010
d07b0e5f80b9
(tramp-open-connection-rsh): Support a kludgy feature for the
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
45979
diff
changeset
|
959 |
45861 | 960 |
961 @item @option{fcp} --- @command{fsh} and @command{fcp} | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
962 @cindex method fcp |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
963 @cindex fcp method |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
964 @cindex fsh |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
965 @cindex fcp |
45861 | 966 |
967 This method is similar to @option{scp}, but it uses the @command{fsh} | |
968 command to connect to the remote host, and it uses @command{fcp} for | |
969 transferring the files. @command{fsh/fcp} are a front-end for | |
970 @command{ssh} which allow for reusing the same @command{ssh} session | |
971 for submitting several commands. This avoids the startup overhead of | |
972 @command{scp} (which has to establish a secure connection whenever it | |
973 is called). Note, however, that you can also use one of the inline | |
974 methods to achieve a similar effect. | |
975 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
976 This method uses the command @samp{fsh @var{host} -l @var{user} |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
977 /bin/sh -i} to establish the connection, it does not work to just say |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
978 @command{fsh @var{host} -l @var{user}}. |
45861 | 979 |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
980 There is no inline method using @command{fsh} as the multiplexing |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
981 provided by the program is not very useful in our context. @tramp{} |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
982 opens just one connection to the remote host and then keeps it open, |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
983 anyway. |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
984 |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
985 @end table |
45861 | 986 |
987 @node Multi-hop Methods | |
988 @section Connecting to a remote host using multiple hops | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
989 @cindex multi-hop methods |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
990 @cindex methods, multi-hop |
45861 | 991 |
992 Sometimes, the methods described before are not sufficient. Sometimes, | |
993 it is not possible to connect to a remote host using a simple command. | |
994 For example, if you are in a secured network, you might have to log in | |
995 to a `bastion host' first before you can connect to the outside world. | |
996 Of course, the target host may also require a bastion host. The format | |
997 of multi-hop filenames is slightly different than the format of normal | |
998 @tramp{} methods. | |
999 | |
1000 A multi-hop file name specifies a method, a number of hops, and a path | |
1001 name on the remote system. The method specifies how the file is | |
1002 transferred through the inline connection. The following two multi-hop | |
1003 methods are available: | |
1004 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1005 @table @asis |
45861 | 1006 @item @option{multi} --- base64 encoding with @command{mimencode} |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1007 @cindex method multi |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1008 @cindex multi method |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1009 @cindex base-64 encoding |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1010 @cindex mimencode |
45861 | 1011 |
1012 The file is transferred through the connection in base64 encoding. Uses | |
1013 the @command{mimencode} program for doing encoding and decoding, but | |
1014 uses an Emacs internal implementation on the local host if available. | |
1015 | |
1016 @item @option{multiu} --- use commands @command{uuencode} and @command{uudecode} | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1017 @cindex method multiu |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1018 @cindex multiu method |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1019 @cindex uuencode |
45861 | 1020 |
1021 The file is transferred through the connection in `uu' encoding. Uses | |
1022 the @command{uuencode} and @command{uudecode} programs for encoding and | |
1023 decoding, but uses a Lisp implementation for decoding on the local host | |
1024 if available. | |
1025 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1026 @end table |
45861 | 1027 |
1028 Each hop consists of a @dfn{hop method} specification, a user name and a | |
1029 host name. The following hop methods are (currently) available: | |
1030 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1031 @table @option |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1032 @item telnet |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1033 @cindex hop method telnet |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1034 @cindex telnet hop method |
45861 | 1035 |
1036 Uses the well-known @command{telnet} program to connect to the host. | |
1037 Whereas user name and host name are supplied in the file name, the | |
1038 user is queried for the password. | |
1039 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1040 @item rsh |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1041 @cindex hop method rsh |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1042 @cindex rsh hop method |
45861 | 1043 |
1044 This uses @command{rsh} to connect to the host. You do not need to | |
1045 enter a password unless @command{rsh} explicitly asks for it. | |
1046 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1047 @item ssh |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1048 @cindex hop method ssh |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1049 @cindex ssh hop method |
45861 | 1050 |
1051 This uses @command{ssh} to connect to the host. You might have to enter | |
1052 a password or a pass phrase. | |
1053 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1054 @item su |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1055 @cindex hop method su |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1056 @cindex su hop method |
45861 | 1057 |
1058 This method does not actually contact a different host, but it allows | |
1059 you to become a different user on the host you're currently on. This | |
1060 might be useful if you want to edit files as root, but the remote host | |
1061 does not allow remote root logins. In this case you can use | |
1062 @option{telnet}, @option{rsh} or @option{ssh} to connect to the | |
1063 remote host as a non-root user, then use an @option{su} hop to become | |
1064 root. But @option{su} need not be the last hop in a sequence, you could | |
1065 also use it somewhere in the middle, if the need arises. | |
1066 | |
1067 Even though you @emph{must} specify both user and host with a | |
1068 @option{su} hop, the host name is ignored and only the user name is | |
1069 used. | |
1070 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1071 @item sudo |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1072 @cindex hop method sudo |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1073 @cindex sudo hop method |
45861 | 1074 |
1075 This is similar to the @option{su} hop, except that it uses | |
1076 @command{sudo} rather than @command{su} to become a different user. | |
1077 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1078 @end table |
45861 | 1079 |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1080 Some people might wish to use port forwarding with @command{ssh} or |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1081 maybe they have to use a nonstandard port. This can be accomplished |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1082 by putting a stanza in @file{~/.ssh/config} for the account which |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1083 specifies a different port number for a certain host name. But it can |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1084 also be accomplished within Tramp, by adding a multi-hop method. For |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1085 example: |
45861 | 1086 |
1087 @lisp | |
1088 (add-to-list 'tramp-multi-connection-function-alist | |
1089 '("sshf" tramp-multi-connect-rlogin "ssh %h -l %u -p 4400%n")) | |
1090 @end lisp | |
1091 | |
1092 Now you can use a @code{sshf} hop which connects to port 4400 instead of | |
1093 the standard port. | |
1094 | |
1095 | |
1096 @node Default Method | |
1097 @section Selecting a default method | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1098 @cindex default method |
45861 | 1099 |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1100 @vindex tramp-default-method |
45861 | 1101 When you select an appropriate transfer method for your typical usage |
1102 you should set the variable @var{tramp-default-method} to reflect that | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1103 choice. This variable controls which method will be used when a method |
45861 | 1104 is not specified in the @tramp{} file path. For example: |
1105 | |
1106 @lisp | |
1107 (setq tramp-default-method "scp") | |
1108 @end lisp | |
1109 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1110 @vindex tramp-default-method-alist |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1111 You can also specify different methods for certain user/host |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1112 combinations, via the variable @var{tramp-default-method-alist}. For |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1113 example, the following two lines specify to use the @option{sm} |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1114 method for all user names matching @samp{john} and the @option{rsync} |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1115 method for all host names matching @samp{lily}. The third line |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1116 specifies to use the @option{sum} method for the user @samp{root} on |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1117 the machine @samp{localhost}. |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1118 |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1119 @lisp |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1120 (add-to-list 'tramp-default-method-alist '("" "john" "sm")) |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1121 (add-to-list 'tramp-default-method-alist '("lily" "" "rsync")) |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1122 (add-to-list 'tramp-default-method-alist |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1123 '("\\`root\\'" "\\`localhost\\'" "sum")) |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1124 @end lisp |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1125 |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1126 @noindent |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1127 See the documentation for the variable |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1128 @var{tramp-default-method-alist} for more details. |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1129 |
45861 | 1130 External transfer methods are normally preferable to inline transfer |
1131 methods, giving better performance. They may not be useful if you use | |
1132 many remote machines where you cannot log in without a password. | |
1133 | |
1134 @xref{Inline methods}. | |
1135 @xref{External transfer methods}. | |
1136 @xref{Multi-hop Methods}. | |
1137 | |
1138 Another consideration with the selection of transfer methods is the | |
1139 environment you will use them in and, especially when used over the | |
1140 Internet, the security implications of your preferred method. | |
1141 | |
1142 The @command{rsh} and @command{telnet} methods send your password as | |
1143 plain text as you log in to the remote machine, as well as transferring | |
1144 the files in such a way that the content can easily be read from other | |
1145 machines. | |
1146 | |
1147 If you need to connect to remote systems that are accessible from the | |
1148 Internet, you should give serious thought to using @command{ssh} based | |
1149 methods to connect. These provide a much higher level of security, | |
1150 making it a non-trivial exercise for someone to obtain your password or | |
1151 read the content of the files you are editing. | |
1152 | |
1153 @node Customizing Methods | |
1154 @section Using Non-Standard Methods | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1155 @cindex customizing methods |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1156 @cindex using non-standard methods |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1157 @cindex create your own methods |
45861 | 1158 |
1159 There is a variable @code{tramp-methods} which you can change if the | |
1160 predefined methods don't seem right. | |
1161 | |
1162 For the time being, I'll refer you to the Lisp documentation of that | |
1163 variable, accessible with @kbd{C-h v tramp-methods @key{RET}}. | |
1164 | |
1165 | |
1166 @node Remote Programs | |
1167 @section How @tramp{} finds and uses programs on the remote machine. | |
1168 | |
1169 @tramp{} depends on a number of programs on the remote host in order to | |
1170 function, including @command{ls}, @command{test}, @command{find} and | |
1171 @command{cat}. | |
1172 | |
1173 In addition to these required tools, there are various tools that may be | |
1174 required based on the connection method. See @ref{Inline methods} and | |
1175 @ref{External transfer methods} for details on these. | |
1176 | |
1177 Certain other tools, such as @command{perl} (or @command{perl5}) and | |
1178 @command{grep} will be used if they can be found. When they are | |
1179 available, they are used to improve the performance and accuracy of | |
1180 remote file access. | |
1181 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1182 @vindex tramp-remote-path |
45861 | 1183 When @tramp{} connects to the remote machine, it searches for the |
1184 programs that it can use. The variable @var{tramp-remote-path} controls | |
1185 the directories searched on the remote machine. | |
1186 | |
1187 By default, this is set to a reasonable set of defaults for most | |
1188 machines. It is possible, however, that your local (or remote ;) system | |
1189 administrator has put the tools you want in some obscure local | |
1190 directory. | |
1191 | |
1192 In this case, you can still use them with @tramp{}. You simply need to | |
1193 add code to your @file{.emacs} to add the directory to the remote path. | |
1194 This will then be searched by @tramp{} when you connect and the software | |
1195 found. | |
1196 | |
1197 To add a directory to the remote search path, you could use code such | |
1198 as: | |
1199 | |
1200 @example | |
1201 (require 'tramp) @i{; @tramp{} must be loaded before this} | |
1202 @i{; happens.} | |
1203 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1204 @i{; We have @command{perl} in "/usr/local/perl/bin"} |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1205 (add-to-list 'tramp-remote-path "/usr/local/perl/bin") |
45861 | 1206 @end example |
1207 | |
1208 @node Remote shell setup | |
1209 @comment node-name, next, previous, up | |
1210 @section Remote shell setup hints | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1211 @cindex remote shell setup |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1212 @cindex .profile file |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1213 @cindex .login file |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1214 @cindex shell init files |
45861 | 1215 |
1216 As explained in the @ref{Overview} section, @tramp{} connects to the | |
1217 remote host and talks to the shell it finds there. Of course, when you | |
1218 log in, the shell executes its init files. Suppose your init file | |
1219 requires you to enter the birthdate of your mother; clearly @tramp{} | |
1220 does not know this and hence fails to log you in to that host. | |
1221 | |
1222 There are different possible strategies for pursuing this problem. One | |
1223 strategy is to enable @tramp{} to deal with all possible situations. | |
1224 This is a losing battle, since it is not possible to deal with | |
1225 @emph{all} situations. The other strategy is to require you to set up | |
1226 the remote host such that it behaves like @tramp{} expect. This might | |
1227 be inconvenient because you have to invest a lot of effort into shell | |
1228 setup before you can begin to use @tramp{}. | |
1229 | |
1230 The package, therefore, pursues a combined approach. It tries to figure | |
1231 out some of the more common setups, and only requires you to avoid | |
1232 really exotic stuff. For example, it looks through a list of | |
1233 directories to find some programs on the remote host. And also, it | |
1234 knows that it is not obvious how to check whether a file exist, and | |
1235 therefore it tries different possibilities. (On some hosts and shells, | |
1236 the command @code{test -e} does the trick, on some hosts the shell | |
1237 builtin doesn't work but the program @code{/usr/bin/test -e} or | |
1238 @code{/bin/test -e} works. And on still other hosts, @code{ls -d} is | |
1239 the right way to do this.) | |
1240 | |
1241 Below you find a discussion of a few things that @tramp{} does not deal | |
1242 with, and that you therefore have to set up correctly. | |
1243 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1244 @table @asis |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1245 @item @var{shell-prompt-pattern} |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1246 @vindex shell-prompt-pattern |
45861 | 1247 |
1248 After logging in to the remote host, @tramp{} has to wait for the remote | |
1249 shell startup to finish before it can send commands to the remote | |
1250 shell. The strategy here is to wait for the shell prompt. In order to | |
1251 recognize the shell prompt, the variable @code{shell-prompt-pattern} has | |
1252 to be set correctly to recognize the shell prompt on the remote host. | |
1253 | |
46346
49f06e689a20
* files.texi (Remote Files): Explain new unified file name synatx.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46010
diff
changeset
|
1254 Note that Tramp requires the match for @code{shell-prompt-pattern} to |
49f06e689a20
* files.texi (Remote Files): Explain new unified file name synatx.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46010
diff
changeset
|
1255 be at the end of the buffer. Many people have something like the |
49f06e689a20
* files.texi (Remote Files): Explain new unified file name synatx.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46010
diff
changeset
|
1256 following as the value for the variable: @code{"^[^>$][>$] *"}. Now |
49f06e689a20
* files.texi (Remote Files): Explain new unified file name synatx.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46010
diff
changeset
|
1257 suppose your shell prompt is @code{a <b> c $ }. In this case, Tramp |
49f06e689a20
* files.texi (Remote Files): Explain new unified file name synatx.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46010
diff
changeset
|
1258 recognizes the @code{>} character as the end of the prompt, but it is |
49f06e689a20
* files.texi (Remote Files): Explain new unified file name synatx.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46010
diff
changeset
|
1259 not at the end of the buffer. |
49f06e689a20
* files.texi (Remote Files): Explain new unified file name synatx.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46010
diff
changeset
|
1260 |
45861 | 1261 @item @code{tset} and other questions |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1262 @cindex Unix command tset |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1263 @cindex tset Unix command |
45861 | 1264 |
1265 Some people invoke the @code{tset} program from their shell startup | |
1266 scripts which asks the user about the terminal type of the shell. Maybe | |
1267 some shells ask other questions when they are started. @tramp{} does | |
1268 not know how to answer these questions. (A facility for enabling | |
1269 @tramp{} to answer these questions is planned for some future version, | |
1270 but don't hold your breath.) | |
1271 | |
1272 Therefore, you should take care that the shell does not ask any | |
1273 questions when invoked from @tramp{}. You can do this by checking the | |
1274 @code{TERM} environment variable, it will be set to @code{dumb} when | |
1275 connecting. | |
1276 | |
1277 @vindex tramp-terminal-type | |
1278 The variable @code{tramp-terminal-type} can be used to change this value | |
1279 @code{dumb}. | |
1280 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1281 @end table |
45861 | 1282 |
1283 | |
1284 @node Windows setup hints | |
1285 @section Issues with Cygwin ssh | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1286 @cindex Cygwin |
45861 | 1287 |
1288 This section needs a lot of work! Please help. | |
1289 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1290 @cindex method smx with Cygwin |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1291 @cindex smx method with Cygwin |
45861 | 1292 If you use the Cygwin installation of ssh (you have to explicitly select |
1293 it in the installer), then it should work out of the box to just select | |
1294 @code{smx} as the connection method. You can find information about | |
1295 setting up Cygwin in their FAQ at @uref{http://cygwin.com/faq/}. | |
1296 | |
1297 | |
1298 @node Usage | |
1299 @chapter Using @tramp | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1300 @cindex using @tramp |
45861 | 1301 |
1302 Once you have installed @tramp{} it will operate fairly transparently. You | |
1303 will be able to access files on any remote machine that you can log in | |
1304 to as though they were local. | |
1305 | |
1306 Files are specified to @tramp{} using a formalized syntax specifying the | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1307 details of the system to connect to. This is similar to the syntax used |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1308 by the @command{EFS} and @command{Ange-FTP} packages. |
45861 | 1309 |
1310 | |
1311 @menu | |
1312 * Filename Syntax:: @tramp{} filename conventions. | |
1313 * Multi-hop filename syntax:: Multi-hop filename conventions | |
1314 * Dired:: Dired and filename completion. | |
1315 @end menu | |
1316 | |
1317 | |
1318 @node Filename Syntax | |
1319 @section @tramp{} filename conventions | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1320 @cindex filename syntax |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1321 @cindex filename examples |
45861 | 1322 |
46348 | 1323 On Emacs, the Ange-FTP and Tramp filenames use a unified syntax. On |
1324 XEmacs, EFS and Tramp use different formats for the filenames. | |
1325 Therefore, the following will describe the Emacs and XEmacs cases | |
1326 separately. | |
45861 | 1327 |
46348 | 1328 On Emacs, to access the file @var{path} on the remote machine |
1329 @var{machine} you would specify the filename | |
1330 @file{/@var{machine}:@var{path}}. This will connect to @var{machine} | |
1331 and transfer the file using the default method. @xref{Default | |
1332 Method}. On XEmacs, use @file{/[@var{machine}]@var{path}}. (The | |
1333 square brackets are part of the file name.) | |
1334 | |
1335 Some examples of @tramp{} filenames are shown below. In each case, | |
1336 the Emacs-style filename is shown first, then the XEmacs-style | |
1337 filename. | |
45861 | 1338 |
1339 @table @file | |
46348 | 1340 @item /melancholia:.emacs |
1341 @itemx /[melancholia].emacs | |
45861 | 1342 Edit the file @file{.emacs} in your home directory on the machine |
1343 @code{melancholia}. | |
1344 | |
46348 | 1345 @item /melancholia.danann.net:.emacs |
1346 @itemx /[melancholia.danann.net].emacs | |
45861 | 1347 This edits the same file, using the fully qualified domain name of |
1348 the machine. | |
1349 | |
46348 | 1350 @item /melancholia:~/.emacs |
1351 @itemx /[melancholia]~/.emacs | |
45861 | 1352 This also edits the same file --- the @file{~} is expanded to your |
1353 home directory on the remote machine, just like it is locally. | |
1354 | |
46348 | 1355 @item /melancholia:~daniel/.emacs |
1356 @itemx /[melancholia]~daniel/.emacs | |
45861 | 1357 This edits the file @file{.emacs} in the home directory of the user |
1358 @code{daniel} on the machine @code{melancholia}. The @file{~<user>} | |
1359 construct is expanded to the home directory of that user on the remote | |
1360 machine. | |
1361 | |
46348 | 1362 @item /melancholia:/etc/squid.conf |
1363 @itemx /[melancholia]/etc/squid.conf | |
45861 | 1364 This edits the file @file{/etc/squid.conf} on the machine |
1365 @code{melancholia}. | |
1366 | |
1367 @end table | |
1368 | |
1369 Unless you specify a different name to use, @tramp{} will use the current | |
1370 local user name as the remote user name to log in with. If you need to | |
1371 log in as a different user, you can specify the user name as part of the | |
1372 filename. | |
1373 | |
46348 | 1374 On Emacs, to log in to the remote machine as a specific user, you use |
1375 the syntax @file{/@var{user}@@@var{machine}:/path/to.file}. On | |
1376 XEmacs, use @file{/[@var{user}@@@var{machine}]/path/to.file}. That | |
1377 means that connecting to @code{melancholia} as @code{daniel} and | |
1378 editing @file{.emacs} in your home directory you would specify | |
1379 @file{/daniel@@melancholia:.emacs} on Emacs and | |
1380 @file{/[daniel@@melancholia].emacs} on XEmacs. | |
45861 | 1381 |
1382 | |
1383 It is also possible to specify other file transfer methods | |
46348 | 1384 (@pxref{Default Method}) as part of the filename. On Emacs, this is |
1385 done by puttig the method before the user and host name, as in | |
1386 @file{/@var{method}:} (note the trailing colon). On XEmacs, it is | |
1387 done by replacing the initial @file{/[} with @file{/[<method>/}. | |
1388 (Note the trailing slash!) The user, machine and file specification | |
1389 remain the same. | |
45861 | 1390 |
46348 | 1391 So, to connect to the machine @code{melancholia} as @code{daniel}, |
1392 using the @option{su} method to transfer files, and edit @file{.emacs} | |
1393 in my home directory I would specify the filename | |
1394 @file{/su:daniel@@melancholia:.emacs} on Emacs and | |
1395 @file{/[su/daniel@@melancholia].emacs} on XEmacs. | |
45861 | 1396 |
1397 | |
1398 @node Multi-hop filename syntax | |
1399 @section Multi-hop filename conventions | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1400 @cindex filename syntax for multi-hop files |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1401 @cindex multi-hop filename syntax |
45861 | 1402 |
1403 The syntax of multi-hop file names is necessarily slightly different | |
1404 than the syntax of other @tramp{} file names. Here's an example multi-hop | |
46348 | 1405 file name, first in Emacs syntax and then in XEmacs syntax: |
45861 | 1406 |
46348 | 1407 @file{/multi:rsh:out@@gate:telnet:kai@@real.host:/path/to.file} |
45861 | 1408 @file{/[multi/rsh:out@@gate/telnet:kai@@real.host]/path/to.file} |
1409 | |
1410 This is quite a mouthful. So let's go through it step by step. The | |
46348 | 1411 file name consists of three parts. On Emacs, the parts are separated |
1412 by colons, on XEmacs they are separated by slashes and square | |
1413 brackets. The first part is @file{/multi:} (or @file{/[multi}), the | |
1414 method specification. The second part is | |
1415 @file{rsh:out@@gate:telnet:kai@@real.host} (or | |
1416 @file{rsh:out@@gate/telnet:kai@@real.host}) and specifies the hops. | |
1417 (Yes, on Emacs the second part may contain even more colons, so that's why | |
1418 this file name has more than two colons in it.) The final part is | |
1419 @file{/path/to.file} and specifies the file name on the remote host. | |
45861 | 1420 |
1421 The first part and the final part should be clear. @ref{Multi-hop | |
1422 Methods}, for a list of alternatives for the method specification. | |
1423 | |
1424 The second part can be subdivided again into components, so-called hops. | |
1425 In the above file name, there are two hops, @file{rsh:out@@gate} and | |
1426 @file{telnet:kai@@real.host}. | |
1427 | |
1428 Each hop can @emph{again} be subdivided into (three) components, the | |
1429 @dfn{hop method}, the @dfn{user name} and the @dfn{host name}. The | |
1430 meaning of the second and third component should be clear, and the hop | |
1431 method says what program to use to perform that hop. | |
1432 | |
1433 The first hop, @file{rsh:out@@gate}, says to use @command{rsh} to log in | |
1434 as user @code{out} to the host @code{gate}. Starting at that host, the | |
1435 second hop, @file{telnet:kai@@real.host}, says to use @command{telnet} | |
1436 to log in as user @code{kai} to host @code{real.host}. | |
1437 | |
1438 @xref{Multi-hop Methods}, for a list of possible hop method values. The | |
1439 variable @var{tramp-multi-connection-function-alist} contains the list of | |
1440 possible hop methods and information on how to execute them, should you | |
1441 want to add your own. | |
1442 | |
1443 | |
1444 @node Dired | |
1445 @section Dired and filename completion | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1446 @cindex dired |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1447 @cindex filename completion |
45861 | 1448 |
1449 @tramp{} works transparently with dired, enabling you to use this powerful | |
1450 file management tool to manage files on any machine you have access to | |
1451 over the Internet. | |
1452 | |
1453 Filename completion also works with @tramp{} for files on remote machines | |
1454 although there is no completion for user names or machine names at this | |
1455 stage. | |
1456 | |
1457 As filename completion needs to fetch the listing of files from the | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1458 remote machine, this feature is sometimes fairly slow. As @tramp{} does not |
45861 | 1459 yet cache the results of directory listing, there is no gain in |
1460 performance the second time you complete filenames. | |
1461 | |
1462 If you need to browse a directory tree, Dired is a better choice, at | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1463 present, than filename completion. Dired has its own cache mechanism |
45861 | 1464 and will only fetch the directory listing once. |
1465 | |
1466 | |
1467 @node Bug Reports | |
1468 @chapter Reporting Bugs and Problems | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1469 @cindex bug reports |
45861 | 1470 |
1471 Bugs and problems with @tramp{} are actively worked on by the development | |
1472 team. Feature requests and suggestions are also more than welcome. | |
1473 | |
1474 The @tramp{} mailing list is a great place to get information on working | |
1475 with @tramp{}, solving problems and general discussion and advice on topics | |
1476 relating to the package. | |
1477 | |
1478 The mailing list is at @email{tramp-devel@@mail.freesoftware.fsf.org}. | |
1479 Messages sent to this address go to all the subscribers. This is | |
1480 @emph{not} the address to send subscription requests to. | |
1481 | |
1482 For help on subscribing to the list, send mail to the administrative | |
1483 address, @email{tramp-devel-request@@mail.freesoftware.fsf.org}, with the | |
1484 subject @samp{help}. | |
1485 | |
1486 To report a bug in @tramp{}, you should execute @kbd{M-x tramp-bug}. This | |
1487 will automatically generate a buffer with the details of your system and | |
1488 @tramp{} version. | |
1489 | |
1490 When submitting a bug report, please try to describe in excruciating | |
1491 detail the steps required to reproduce the problem, the setup of the | |
1492 remote machine and any special conditions that exist. | |
1493 | |
1494 If you can identify a minimal test case that reproduces the problem, | |
1495 include that with your bug report. This will make it much easier for the | |
1496 development team to analyze and correct the problem. | |
1497 | |
1498 @node Frequently Asked Questions | |
1499 @chapter Frequently Asked Questions | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1500 @cindex frequently asked questions |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1501 @cindex FAQ |
45861 | 1502 |
1503 @itemize @bullet | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1504 @item |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1505 Where can I get the latest @tramp{}? |
45861 | 1506 |
1507 @tramp{} is available at | |
1508 @uref{ftp://ls6-ftp.cs.uni-dortmund.de/pub/src/emacs/tramp.tar.gz}. | |
1509 There is also a Savannah project page, at | |
1510 @uref{https://savannah.gnu.org/projects/tramp/}. | |
1511 | |
1512 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1513 @item |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1514 Which systems does it work on? |
45861 | 1515 |
1516 The package has been used successfully on Emacs 20 and Emacs 21, as well | |
1517 as XEmacs 21. XEmacs 20 is more problematic, see the notes in | |
1518 @file{tramp.el}. I don't think anybody has really tried it on Emacs 19. | |
1519 | |
1520 The package was intended to work on Unix, and it really expects a | |
1521 Unix-like system on the remote end, but some people seemed to have some | |
1522 success getting it to work on NT Emacs. | |
1523 | |
1524 There are some informations on Tramp on NT at the following URL; many | |
1525 thanks to Joe Stoy for providing the information: | |
1526 @uref{ftp://ftp.comlab.ox.ac.uk/tmp/Joe.Stoy/} | |
1527 | |
1528 The above mostly contains patches to old ssh versions; Tom Roche has a | |
1529 Web page with instructions: | |
1530 @uref{http://www4.ncsu.edu/~tlroche/plinkTramp.html} | |
1531 | |
1532 ??? Is the XEmacs info correct? | |
1533 | |
1534 ??? Can somebody provide some information for getting it to work on NT | |
1535 Emacs? I think there was some issue with @command{ssh}? | |
1536 | |
1537 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1538 @item |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1539 I can't stop EFS starting with XEmacs |
45861 | 1540 |
1541 Not all the older versions of @tramp{} supported XEmacs correctly. The | |
1542 first thing to do is to make sure that you have the latest version of | |
1543 @tramp{} installed. | |
1544 | |
1545 If you do, please try and find out exactly the conditions required for | |
1546 the @code{EFS} handlers to fire. If you can, putting a breakpoint on | |
1547 @code{efs-ftp-path} and sending in the stack trace along with your bug | |
1548 report would make it easier for the developers to work out what is going | |
1549 wrong. | |
1550 | |
1551 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1552 @item |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1553 File name completion does not work with @tramp{} |
45861 | 1554 |
1555 When you log in to the remote machine, do you see the output of | |
1556 @command{ls} in color? If so, this may be the cause of your problems. | |
1557 | |
1558 @command{ls} outputs @acronym{ANSI} escape sequences that your terminal | |
1559 emulator interprets to set the colors. These escape sequences will | |
1560 confuse @tramp{} however. | |
1561 | |
1562 In your @file{.bashrc}, @file{.profile} or equivalent on the remote | |
1563 machine you probably have an alias configured that adds the option | |
1564 @option{--color=yes} or @option{--color=auto}. | |
1565 | |
1566 You should remove that alias and ensure that a new login @emph{does not} | |
1567 display the output of @command{ls} in color. If you still cannot use | |
1568 filename completion, report a bug to the @tramp{} developers. | |
1569 | |
1570 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1571 @item |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1572 File name completion does not work in large directories |
45861 | 1573 |
1574 @tramp{} uses globbing for some operations. (Globbing means to use the | |
1575 shell to expand wildcards such as `*.c'.) This might create long | |
1576 command lines, especially in directories with many files. Some shell | |
1577 choke on long command lines, or don't cope well with the globbing | |
1578 itself. | |
1579 | |
1580 If you have a large directory on the remote end, you may wish to execute | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1581 a command like @samp{ls -d * ..?* > /dev/null} and see if it hangs. |
45861 | 1582 Note that you must first start the right shell, which might be |
1583 @command{/bin/sh}, @command{ksh} or @command{bash}, depending on which | |
1584 of those supports tilde expansion. | |
1585 | |
1586 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1587 @item |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1588 What kinds of systems does @tramp{} work on |
45861 | 1589 |
1590 @tramp{} really expects the remote system to be a Unix-like system. The | |
1591 local system should preferably be Unix-like, as well, but @tramp{} might | |
1592 work on NT with some tweaking. | |
1593 | |
1594 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1595 @item |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1596 How can I get notified when @tramp{} file transfers are complete? |
45861 | 1597 |
1598 The following snippet can be put in your @file{~/.emacs} file. It makes | |
1599 Emacs beep after reading from or writing to the remote host. | |
1600 | |
1601 @lisp | |
1602 (defadvice tramp-handle-write-region | |
1603 (after tramp-write-beep-advice activate) | |
1604 " make tramp beep after writing a file." | |
1605 (interactive) | |
1606 (beep)) | |
1607 (defadvice tramp-handle-do-copy-or-rename-file | |
1608 (after tramp-copy-beep-advice activate) | |
1609 " make tramp beep after copying a file." | |
1610 (interactive) | |
1611 (beep)) | |
1612 (defadvice tramp-handle-insert-file-contents | |
1613 (after tramp-copy-beep-advice activate) | |
1614 " make tramp beep after copying a file." | |
1615 (interactive) | |
1616 (beep)) | |
1617 @end lisp | |
1618 | |
1619 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1620 @item |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1621 There's this @file{~/.sh_history} file on the remote host which keeps |
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1622 growing and growing. What's that? |
45861 | 1623 |
1624 Sometimes, @tramp{} starts @code{ksh} on the remote host for tilde | |
1625 expansion. Maybe @code{ksh} saves the history by default. @tramp{} | |
1626 tries to turn off saving the history, but maybe you have to help. For | |
1627 example, you could put this in your @file{.kshrc}: | |
1628 | |
1629 @example | |
1630 if [ -f $HOME/.sh_history ] ; then | |
1631 /bin/rm $HOME/.sh_history | |
1632 fi | |
1633 if [ "$@{HISTFILE-unset@}" != "unset" ] ; then | |
1634 unset HISTFILE | |
1635 fi | |
1636 if [ "$@{HISTSIZE-unset@}" != "unset" ] ; then | |
1637 unset HISTSIZE | |
1638 fi | |
1639 @end example | |
1640 | |
1641 @end itemize | |
1642 | |
1643 | |
1644 @c For the developer | |
1645 @node Version Control | |
1646 @chapter The inner workings of remote version control | |
1647 | |
46361
a3acca116f2f
Comply with Texinfo coding standards. Suggestions by Eli.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46348
diff
changeset
|
1648 Unlike EFS and Ange-FTP, @tramp{} has full shell access to the remote |
45861 | 1649 machine. This makes it possible to provide version control for files |
1650 accessed under @tramp{}. | |
1651 | |
1652 The actual version control binaries must be installed on the remote | |
1653 machine, accessible in the directories specified in | |
1654 @var{tramp-remote-path}. | |
1655 | |
1656 This transparent integration with the version control systems is one of | |
1657 the most valuable features provided by @tramp{}, but it is far from perfect. | |
1658 Work is ongoing to improve the transparency of the system. | |
1659 | |
1660 @menu | |
1661 * Version Controlled Files:: Determining if a file is under version control. | |
1662 * Remote Commands:: Executing the version control commands on the remote machine. | |
1663 * Changed workfiles:: Detecting if the working file has changed. | |
1664 * Checking out files:: Bringing the workfile out of the repository. | |
1665 * Miscellaneous Version Control:: Things related to Version Control that don't fit elsewhere | |
1666 @end menu | |
1667 | |
1668 | |
1669 @node Version Controlled Files | |
1670 @section Determining if a file is under version control | |
1671 | |
1672 The VC package uses the existence of on-disk revision control master | |
1673 files to determine if a given file is under revision control. These file | |
1674 tests happen on the remote machine through the standard @tramp{} mechanisms. | |
1675 | |
1676 | |
1677 @node Remote Commands | |
1678 @section Executing the version control commands on the remote machine | |
1679 | |
1680 There are no hooks provided by VC to allow intercepting of the version | |
1681 control command execution. The calls occur through the | |
1682 @code{call-process} mechanism, a function that is somewhat more | |
1683 efficient than the @code{shell-command} function but that does not | |
1684 provide hooks for remote execution of commands. | |
1685 | |
1686 To work around this, the functions @code{vc-do-command} and | |
1687 @code{vc-simple-command} have been advised to intercept requests for | |
1688 operations on files accessed via @tramp{}. | |
1689 | |
1690 In the case of a remote file, the @code{shell-command} interface is | |
1691 used, with some wrapper code, to provide the same functionality on the | |
1692 remote machine as would be seen on the local machine. | |
1693 | |
1694 | |
1695 @node Changed workfiles | |
1696 @section Detecting if the working file has changed | |
1697 | |
1698 As there is currently no way to get access to the mtime of a file on a | |
1699 remote machine in a portable way, the @code{vc-workfile-unchanged-p} | |
1700 function is advised to call an @tramp{} specific function for remote files. | |
1701 | |
1702 The @code{tramp-vc-workfile-unchanged-p} function uses the functioning VC | |
1703 diff functionality to determine if any changes have occurred between the | |
1704 workfile and the version control master. | |
1705 | |
1706 This requires that a shell command be executed remotely, a process that | |
1707 is notably heavier-weight than the mtime comparison used for local | |
1708 files. Unfortunately, unless a portable solution to the issue is found, | |
1709 this will remain the cost of remote version control. | |
1710 | |
1711 | |
1712 @node Checking out files | |
1713 @section Bringing the workfile out of the repository | |
1714 | |
1715 VC will, by default, check for remote files and refuse to act on them | |
1716 when checking out files from the repository. To work around this | |
1717 problem, the function @code{vc-checkout} knows about @tramp{} files and | |
1718 allows version control to occur. | |
1719 | |
1720 | |
1721 @node Miscellaneous Version Control | |
1722 @section Things related to Version Control that don't fit elsewhere | |
1723 | |
1724 Minor implementation details, &c. | |
1725 | |
1726 @menu | |
1727 * Remote File Ownership:: How VC determines who owns a workfile. | |
1728 * Back-end Versions:: How VC determines what release your RCS is. | |
1729 @end menu | |
1730 | |
1731 | |
1732 @node Remote File Ownership | |
1733 @subsection How VC determines who owns a workfile | |
1734 | |
1735 Emacs provides the @code{user-full-name} function to return the login name | |
1736 of the current user as well as mapping from arbitrary user id values | |
1737 back to login names. The VC code uses this functionality to map from the | |
1738 uid of the owner of a workfile to the login name in some circumstances. | |
1739 | |
1740 This will not, for obvious reasons, work if the remote system has a | |
1741 different set of logins. As such, it is necessary to delegate to the | |
1742 remote machine the job of determining the login name associated with a | |
1743 uid. | |
1744 | |
1745 Unfortunately, with the profusion of distributed management systems such | |
1746 as @code{NIS}, @code{NIS+} and @code{NetInfo}, there is no simple, | |
1747 reliable and portable method for performing this mapping. | |
1748 | |
1749 Thankfully, the only place in the VC code that depends on the mapping of | |
1750 a uid to a login name is the @code{vc-file-owner} function. This returns | |
1751 the login of the owner of the file as a string. | |
1752 | |
1753 This function has been advised to use the output of @command{ls} on the | |
1754 remote machine to determine the login name, delegating the problem of | |
1755 mapping the uid to the login to the remote system which should know more | |
1756 about it than I do. | |
1757 | |
1758 | |
1759 @node Back-end Versions | |
1760 @subsection How VC determines what release your RCS is | |
1761 | |
1762 VC needs to know what release your revision control binaries you are | |
1763 running as not all features VC supports are available with older | |
1764 versions of @command{rcs(1)}, @command{cvs(1)} or @command{sccs(1)}. | |
1765 | |
1766 The default implementation of VC determines this value the first time it | |
1767 is needed and then stores the value globally to avoid the overhead of | |
1768 executing a process and parsing its output each time the information is | |
1769 needed. | |
1770 | |
1771 Unfortunately, life is not quite so easy when remote version control | |
1772 comes into the picture. Each remote machine may have a different version | |
1773 of the version control tools and, while this is painful, we need to | |
1774 ensure that unavailable features are not used remotely. | |
1775 | |
1776 To resolve this issue, @tramp{} currently takes the sledgehammer | |
1777 approach of making the release values of the revision control tools | |
1778 local to each @tramp{} buffer, forcing VC to determine these values | |
1779 again each time a new file is visited. | |
1780 | |
1781 This has, quite obviously, some performance implications. Thankfully, | |
1782 most of the common operations performed by VC do not actually require | |
1783 that the remote version be known. This makes the problem far less | |
1784 apparent. | |
1785 | |
1786 Eventually these values will be captured by @tramp{} on a system by | |
1787 system basis and the results cached to improve performance. | |
1788 | |
1789 | |
1790 @node Files directories and paths | |
1791 @chapter How file names, directories and paths are mangled and managed. | |
1792 | |
1793 @menu | |
1794 * Path deconstruction:: Breaking a path into its components. | |
1795 @end menu | |
1796 | |
1797 | |
1798 @node Path deconstruction | |
1799 @section Breaking a path into its components. | |
1800 | |
1801 @tramp{} filenames are somewhat different, obviously, to ordinary path | |
1802 names. As such, the lisp functions @code{file-name-directory} and | |
1803 @code{file-name-nondirectory} are overridden within the @tramp{} package. | |
1804 | |
1805 Their replacements are reasonably simplistic in their approach. They | |
1806 dissect the filename, call the original handler on the remote path and | |
1807 then rebuild the @tramp{} path with the result. | |
1808 | |
1809 This allows the platform specific hacks in the original handlers to take | |
1810 effect while preserving the @tramp{} path information. | |
1811 | |
1812 | |
1813 @node Issues | |
1814 @chapter Debatable Issues and What Was Decided | |
1815 | |
1816 @itemize @bullet | |
1817 @item The uuencode method does not always work. | |
1818 | |
1819 Due to the design of @tramp{}, the encoding and decoding programs need to | |
1820 read from stdin and write to stdout. On some systems, @code{uudecode -o | |
1821 -} will read stdin and write the decoded file to stdout, on other | |
1822 systems @code{uudecode -p} does the same thing. But some systems have | |
1823 uudecode implementations which cannot do this at all---it is not | |
1824 possible to call these uudecode implementations with suitable parameters | |
1825 so that they write to stdout. | |
1826 | |
1827 Of course, this could be circumvented: the @code{begin foo 644} line | |
1828 could be rewritten to put in some temporary file name, then | |
1829 @code{uudecode} could be called, then the temp file could be printed and | |
1830 deleted. | |
1831 | |
1832 But I have decided that this is too fragile to reliably work, so on some | |
1833 systems you'll have to do without the uuencode methods. | |
1834 | |
1835 @item @tramp{} does not work on XEmacs 20. | |
1836 | |
1837 This is because it requires the macro @code{with-timeout} which does not | |
1838 appear to exist in XEmacs 20. I'm somewhat reluctant to add an | |
1839 emulation macro to @tramp{}, but if somebody who uses XEmacs 20 steps | |
1840 forward and wishes to implement and test it, please contact me or the | |
1841 mailing list. | |
1842 | |
46348 | 1843 @item The @tramp{} filename syntax differs between Emacs and XEmacs. |
1844 | |
1845 The Emacs maintainers wish to use a unified filename syntax for | |
1846 Ange-FTP and @tramp{} so that users don't have to learn a new | |
1847 syntax. It is sufficient to learn some extensions to the old syntax. | |
1848 | |
1849 For the XEmacs maintainers, the problems caused from using a unified | |
1850 filename syntax are greater than the gains. The XEmacs package | |
1851 system uses EFS for downloading new packages. So, obviously, EFS has | |
1852 to be installed from the start. If the filenames were unified, Tramp | |
1853 would have to be installed from the start, too. | |
1854 | |
45861 | 1855 @end itemize |
1856 | |
1857 | |
1858 @c End of tramp.texi - the TRAMP User Manual | |
1859 @bye | |
1860 | |
1861 @c TODO | |
1862 @c | |
1863 @c * Say something about the .login and .profile files of the remote | |
1864 @c shells. | |
1865 @c * Explain how tramp.el works in principle: open a shell on a remote | |
1866 @c host and then send commands to it. | |
46346
49f06e689a20
* files.texi (Remote Files): Explain new unified file name synatx.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46010
diff
changeset
|
1867 @c * Mention that bookmarks are a cool feature to go along with Tramp. |
49f06e689a20
* files.texi (Remote Files): Explain new unified file name synatx.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46010
diff
changeset
|
1868 @c * Make terminology "inline" vs "out-of-band" consistent. |
49f06e689a20
* files.texi (Remote Files): Explain new unified file name synatx.
Kai Großjohann <kgrossjo@eu.uu.net>
parents:
46010
diff
changeset
|
1869 @c It seems that "external" is also used instead of "out-of-band". |
45861 | 1870 |