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 one of the commands defined in
tramp-remote-coding-commands
. TRAMP uses the first
reliable command it finds. TRAMP’s search path can be
customized, see How TRAMP finds and uses programs on the remote host.
In case none of the commands are available, TRAMP first transfers a small Perl program to the remote host, and then tries to use that program for encoding and decoding.
To increase transfer speeds for large text files, TRAMP can
use compression before encoding. The user option
tramp-inline-compress-start-size
specifies the file size above
which to use this optimization. This feature depends on the
availability and usability of one of the commands defined in
tramp-inline-compress-commands
.
rsh
is an option for connecting to hosts within local
networks since rsh
is not as secure as other methods.
There should be no reason to use it, as ssh
is a both a
complete replacement and ubiquitous.
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.
Connecting to a remote host with telnet
is as insecure
as the rsh method.
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
Connecting to a remote host using multiple hops for an exception to this behavior.
Similar to su method, sudo uses sudo
.
sudo
must have sufficient rights to start a shell.
For security reasons, a sudo connection is disabled after a predefined timeout (5 minutes by default). This can be changed, see Setting own connection related information.
This method is used on OpenBSD like the sudo
command. Like
the sudo method, a doas connection is disabled after
a predefined timeout.
The sg
program allows editing as different group. The host
can be either ‘localhost’ or the host returned by the function
(system-name)
. The user name must be specified, but it
denotes a group name. See Connecting to a remote host using multiple hops for an exception to this
behavior.
Works like ssh but without the extra authentication prompts.
sshx uses ‘ssh -t -t -l user -o
RemoteCommand='/bin/sh -i' host’ to open a connection with a
“standard” login shell. It supports changing the remote login shell
/bin/sh
.
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 MS 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.
This method is also similar to ssh. It uses the
krlogin -x
command only for remote host login.
This is another method from the Kerberos suite. It behaves like su.
plink method is for MS Windows users with the PuTTY
implementation of SSH. It uses ‘plink -ssh’ to log in to the
remote host. It supports changing the remote login shell /bin/sh
.
Check the ‘Share SSH connections if possible’ control for that session.
plink method supports the ‘-P’ argument.
Another method using PuTTY on MS 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. It
supports changing the remote login shell /bin/sh
.
Check the ‘Share SSH connections if possible’ control for that session.
Integration for Docker containers. The host name may be either a running container’s name or ID, as returned by ‘docker ps’.
Podman is an alternative to docker which may be run rootless, if desired.
Integration for containers in Kubernetes pods. The host name is a pod name returned by ‘kubectl get pods’. The first container in a pod is used.
This method does not support user names.