tramp: Inline methods
4.2 Inline methods
==================
Inline methods use the same login connection to transfer file contents.
Inline methods are quick and easy for small files. They depend on the
availability of suitable encoding and decoding programs on the remote
host. For local source and destination, TRAMP may use built-in
equivalents of such programs in Emacs.
Inline methods can work in situations where an external transfer
program is unavailable. Inline methods also work when transferring
files between different _user identities_ on the same host.
TRAMP checks the remote host for the availability and usability of
‘mimencode’ (part of the ‘metamail’ package) or ‘uuencode’. TRAMP uses
the first reliable command it finds. TRAMP’s search path can be
customized, see Remote programs.
In case both ‘mimencode’ and ‘uuencode’ are unavailable, TRAMP first
transfers a small Perl program to the remote host, and then tries that
program for encoding and decoding.
To increase transfer speeds for large text files, use compression
before encoding. The variable TRAMP-INLINE-COMPRESS-START-SIZE
specifies the file size for such optimization.
‘rsh’
‘rsh’ is an option for connecting to hosts within local networks
since ‘rsh’ is not as secure as other methods.
‘ssh’
‘ssh’ is a more secure option than others to connect to a remote
host.
‘ssh’ can also take extra parameters as port numbers. For example,
a host on port 42 is specified as ‘host#42’ (the real host name, a
hash sign, then a port number). It is the same as passing ‘-p 42’
to the ‘ssh’ command.
‘telnet’
Connecting to a remote host with ‘telnet’ is as insecure as the
‘rsh’ method.
‘su’
Instead of connecting to a remote host, ‘su’ program allows editing
as another user. The host can be either ‘localhost’ or the host
returned by the function ‘(system-name)’. See Multi-hops
for an exception to this behavior.
‘sudo’
Similar to ‘su’ method, ‘sudo’ uses ‘sudo’. ‘sudo’ must have
sufficient rights to start a shell.
‘sshx’
Works like ‘ssh’ but without the extra authentication prompts.
‘sshx’ uses ‘ssh -t -t HOST -l USER /bin/sh’ to open a connection
with a “standard” login shell.
*Note* that ‘sshx’ does not bypass authentication questions. For
example, if the host key of the remote host is not known, ‘sshx’
will still ask “Are you sure you want to continue connecting?”.
TRAMP cannot handle such questions. Connections will have to be
setup where logins can proceed without such questions.
‘sshx’ is useful for Windows users when ‘ssh’ triggers an error
about allocating a pseudo tty. This happens due to missing shell
prompts that confuses TRAMP.
‘sshx’ supports the ‘-p’ argument.
‘krlogin’
This method is also similar to ‘ssh’. It uses the ‘krlogin -x’
command only for remote host login.
‘ksu’
This is another method from the Kerberos suite. It behaves like
‘su’.
‘plink’
‘plink’ method is for Windows users with the PuTTY implementation
of SSH. It uses ‘plink -ssh’ to log in to the remote host.
Check the ‘Share SSH connections if possible’ control for that
session.
‘plink’ method supports the ‘-P’ argument.
‘plinkx’
Another method using PuTTY on Windows with session names instead of
host names. ‘plinkx’ calls ‘plink -load SESSION -t’. User names
and port numbers must be defined in the session.
Check the ‘Share SSH connections if possible’ control for that
session.