Next: External methods, Previous: Connection types, Up: Configuration

### 4.2 Inline methods

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 GNU 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.

`rsh`
  Connect to the remote host with `rsh`. Due to the unsecure connection it is recommended for very local host topology only.

  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.

`ssh`
  Connect to the remote host with `ssh`. This is identical to the previous option except that the `ssh` package is used, making the connection more secure.

  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 `ssh` command.

`telnet`
  Connect to the remote host with `telnet`. This is as unsecure as the `rsh` method.
`su`
  This method does not connect to a remote host at all, rather it uses the `su` program to allow you to edit files as another user. That means, the specified host name in the file name must be either ‘`localhost`’ or the host name as returned by the function `(system-name)`. For an exception of this rule see Multi-hops.
`sudo`
  This is similar to the `su` method, but it uses `sudo` rather than `su` to become a different user.

  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.

`sshx`
  As you would expect, this is similar to `ssh`, only a little different. Whereas `ssh` opens a normal interactive shell on the remote host, this option uses ‘`ssh -t -t host -l user /bin/sh`’ to open a connection. This is useful for users where the normal login shell is set up to ask them a number of questions when logging in. This procedure avoids these questions, and just gives tramp a more-or-less `standard' login shell to work with.

  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 GNU 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.

`krlogin`
  This method is also similar to `ssh`. It only uses the `krlogin -x` command to log in to the remote host.
`ksu`
  This is another method from the Kerberos suite. It behaves like `su`.
`plink`
  This method is mostly interesting for Windows users using the PuTTY implementation of SSH. It uses ‘`plink -ssh`’ to log in to the remote host.

  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 `tramp-rsh-end-of-line`.

`plinkx`
  Another method using PuTTY on Windows. Instead of host names, it expects PuTTY session names, calling ‘`plink -load session-t"`’. User names are relevant only in case the corresponding session hasn't defined a user name. Different port numbers must be defined in the session.