Go to the first, previous, next, last section, table of contents.

Remote Host Shell

Emacs provides two commands for logging in to another computer and communicating with it through an Emacs buffer.

M-x telnet RET hostname RET
Set up a Telnet connection to the computer named hostname.
M-x rlogin RET hostname RET
Set up an Rlogin connection to the computer named hostname.

Use M-x telnet to set up a Telnet connection to another computer. (Telnet is the standard Internet protocol for remote login.) It reads the host name of the other computer as an argument with the minibuffer. Once the connection is established, talking to the other computer works like talking to a subshell: you can edit input with the usual Emacs commands, and send it a line at a time by typing RET. The output is inserted in the Telnet buffer interspersed with the input.

Use M-x rlogin to set up an Rlogin connection. Rlogin is another remote login communication protocol, essentially much like the Telnet protocol but incompatible with it, and supported only by certain systems. Rlogin's advantages are that you can arrange not to have to give your user name and password when communicating between two machines you frequently use, and that you can make an 8-bit-clean connection. (To do that in Emacs, set rlogin-explicit-args to ("-8") before you run Rlogin.)

M-x rlogin sets up the default file directory of the Emacs buffer to access the remote host via FTP (see section File Names), and it tracks the shell commands that change the current directory, just like Shell mode.

There are two ways of doing directory tracking in an Rlogin buffer--either with remote directory names `/host:dir/' or with local names (that works if the "remote" machine shares file systems with your machine of origin). You can use the command rlogin-directory-tracking-mode to switch modes. No argument means use remote directory names, a positive argument means use local names, and a negative argument means turn off directory tracking.

Go to the first, previous, next, last section, table of contents.