The inline methods in tramp are quite powerful and can work in situations where you cannot use an external transfer program to connect. Inline methods are the only methods that work when connecting to the remote machine via telnet. (There are also strange inline methods which allow you to transfer files between user identities rather than hosts, see below.)
These methods depend on the existence of a suitable encoding and decoding command on remote machine. Locally, tramp may be able to use features of Emacs to decode and encode the files or it may require access to external commands to perform that task.
tramp checks the availability and usability of commands like mimencode (part of the metamail package) or uuencode on the remote host. The first reliable command will be used. The search path can be customized, see Remote Programs.
If both commands aren't available on the remote host, tramp transfers a small piece of Perl code to the remote host, and tries to apply it for encoding and decoding.
The variable tramp-inline-compress-start-size controls, whether a file shall be compressed before encoding. This could increase transfer speed for large text files.
On operating systems which provide the command remsh instead
of rsh, you can use the method remsh. This is true
for HP-UX or Cray UNICOS, for example.
There are also two variants, ssh1 and ssh2, that call ‘ssh -1’ and ‘ssh -2’, respectively. This way, you can explicitly select whether you want to use the SSH protocol version 1 or 2 to connect to the remote host. (You can also specify in ~/.ssh/config, the SSH configuration file, which protocol should be used, and use the regular ssh method.)
All the methods based on ssh have an additional feature: you
can specify a host name which looks like host#42 (the real host
name, then a hash sign, then a port number). This means to connect to
the given host but to also pass
-p 42 as arguments to the
Note that sudo must be configured to allow you to start a
shell as the user. It would be nice if it was sufficient if
ls and mimencode were allowed, but that is not
easy to implement, so I haven't got around to it, yet.
Note that this procedure does not eliminate questions asked by ssh itself. For example, ssh might ask “Are you sure you want to continue connecting?” if the host key of the remote host is not known. tramp does not know how to deal with such a question (yet), therefore you will need to make sure that you can log in without such questions.
This is also useful for Windows users where ssh, when invoked from an Emacs buffer, tells them that it is not allocating a pseudo tty. When this happens, the login shell is wont to not print any shell prompt, which confuses tramp mightily.
This supports the ‘-p’ argument.
This supports the ‘-P’ argument.
Additionally, the methods plink1 and plink2 are provided, which call ‘plink -1 -ssh’ or ‘plink -2 -ssh’ in order to use SSH protocol version 1 or 2 explicitly.
CCC: Do we have to connect to the remote host once from the command line to accept the SSH key? Maybe this can be made automatic?
CCC: Say something about the first shell command failing. This might
be due to a wrong setting of