TELNET(1) — User’s Manual — Commands
NAME
telnet communicate using TELNET protocol
SYNOPSIS
telnet [ open-arguments ]
DESCRIPTION
Telnet command communicates with another host using the TELNET protocol. Telnet enters command mode, indicated by its prompt (an asterisk) if it is invoked with no arguments. In command mode, telnet accepts and executes telnet commands listed below. If it is invoked with arguments, telnet performs an open command (see below) with those arguments. Thus, for instance, telnet hostname opens a connection to hostname.
Once a connection has been opened, telnet enters input mode. In this mode, text typed to telnet is sent to the remote host. To issue telnet commands when in input mode, precede them with the telnet escape character (initially ^). All text from the telnet escape character to the end of the line is taken to be a telnet command. Neither the escape character nor the command is sent to the foreign host. To send the escape character, type two of them in succession.
When in input mode, the normal terminal editing conventions may not be available, rendering it difficult to type complicated telnet commands. If you type an escape character at the end of a line, telnet will enter command mode for one line.
The following commands are available. Only enough of each command to uniquely identify it need be typed.
help, ? Briefly explain each command.
verbose Announce all changes in the status of the connection.
brief Announce only important changes in the status of the connection (default).
quit Close the connection and return to command level.
ip Send an Interrupt-Process command. This will generally interrupt that is, halt the current command or process on the foreign host.
ao Send an Abort-Output command. If the foreign host implements it, Abort-Output will cause output from the foreign host to be aborted, but permit the current command or process to continue to completion.
synch Send a TELNET Synch.
break Send a Break command. This command is intended to simulate pressing the BREAK key on a terminal attached to the foreign host.
ec Send an Erase-Character command. This command erases the last character sent to the foreign host, just as the foreign hosts indigenous erase character would.
el Send an Erase-Line command. This command erases the entire last line sent to the foreign host, just as the foreign hosts indigenous erase-line character would.
ga Send a Go-Ahead command. This command is useful only in special circumstances, such as when communicating with another terminal which requires an explicit command to unlock its keyboard.
ayt Send an Are-You-There command. If the foreign host is still up and reading the users characters, it will respond in some visible or audible way. Note that a response to this command only guarantees that the server on the foreign host is up; it does not necessarily imply anything about the state of the users process or job.
stty Set or display the terminal modes. The syntax is identical to that of the UNIX stty (1) command. If the command is issued with no arguments, it will merely print out the current terminal modes, just like stty.
modtty Set or display the extended terminal modes. This command merely invokes the system modtty command (if it exists).
x Invoke the Shell and pass it the rest of the line for execution. While the Shell is invoked, the modes of the terminal are changed to those in use when telnet was invoked. If there are no arguments to x, the shell will read from the standard input until an EOT (CNTRL-D) is typed instead.
open [ host-id ] [ option ]
connect [ host-id ] [ option ]
Open a network connection to the specified host. The options are as follows:
-fs # Use the specified foreign socket number. The default is socket 23.
-t # Set timeout. If the connection attempt does not complete in the specified number of seconds, it will be aborted.
-ls # Use the specified local socket number. The default is unspecified, unless server is specified, in which case it is socket 23 decimal.
direct
init
specific
server
duplex
relative
These options set the corresponding flags in the call upon the NCP. Their use is somewhat specialized and will not be described here. See NCP (4).
fd fdes This option sets the file descriptor used by the NCP when the relative option is specified. Its use is somewhat specialized. See NCP (4).
After the command is issued, telnet will say Trying. When the connection becomes established, telnet will say Open.
close Close the current network connection (if any). Telnet will wait until its internal buffers have been emptied before closing the connection.
(Telnet also implements the suppress-go-ahead option, by accepting it and taking no action.)
set escape c
Set the escape character to c.
set escape off
Turn off the escape character. This command renders it impossible to issue telnet commands.
Once a connection has been opened, the messages "Remote echo" or "Local echo" may appear. "Remote echo" indicates that typed characters will be echoed by the remote host, rather than by the UNIX system running telnet. "Local echo" indicates that typed characters will be echoed by the local host. When remote echo is in effect, the normal erase and kill line characters will have no effect; instead, they will be transmitted directly to the foreign host. Similarly, INTERRUPT (DEL), QUIT (FS), and EOF (CTRL-D) will also be transmitted to the foreign host. When local-echo is in effect, all these characters will have their usual effect except INTERRUPT, which will send a TELNET Interrupt-Process command.
BUGS
Sun System Release 0.3 — 7 April 1983