man telnet Command

Man page for apt-get telnet Command

Man Page for telnet in Linux

Ubuntu Man Command : man telnet

Man Telnet  Command

This tutorial shows the man page for man telnet in linux.

Open terminal with 'su' access and type the command as shown below:
man telnet

Result of the Command Execution shown below:

TELNET(1)                                                      BSD General Commands Manual                                                      TELNET(1)

NAME
telnet user interface to the TELNET protocol

SYNOPSIS
telnet [ 468ELadr] [ S tos] [ b address] [ e escapechar] [ l user] [ n tracefile] [host [port]]

DESCRIPTION
The telnet command is used for interactive communication with another host using the TELNET protocol. It begins in command mode, where it prints a
telnet prompt ("telnet> "). If telnet is invoked with a host argument, it performs an open command implicitly; see the description below.

Options:

4 Force IPv4 address resolution.

6 Force IPv6 address resolution.

8 Request 8 bit operation. This causes an attempt to negotiate the TELNET BINARY option for both input and output. By default telnet is not
8 bit clean.

E Disables the escape character functionality; that is, sets the escape character to ``no character''.

L Specifies an 8 bit data path on output. This causes the TELNET BINARY option to be negotiated on just output.

a Attempt automatic login. Currently, this sends the user name via the USER variable of the ENVIRON option if supported by the remote system.
The username is retrieved via getlogin(3).

b address
Use bind(2) on the local socket to bind it to a specific local address.

d Sets the initial value of the debug toggle to TRUE.

r Emulate rlogin(1). In this mode, the default escape character is a tilde. Also, the interpretation of the escape character is changed: an
escape character followed by a dot causes telnet to disconnect from the remote host. A ^Z instead of a dot suspends telnet, and a ^] (the
default telnet escape character) generates a normal telnet prompt. These codes are accepted only at the beginning of a line.

S tos Sets the IP type of service (TOS) option for the telnet connection to the value tos.

e escapechar
Sets the escape character to escapechar. If no character is supplied, no escape character will be used. Entering the escape character while
connected causes telnet to drop to command mode.

l user
Specify user as the user to log in as on the remote system. This is accomplished by sending the specified name as the USER environment vari
able, so it requires that the remote system support the TELNET ENVIRON option. This option implies the a option, and may also be used with
the open command.

n tracefile
Opens tracefile for recording trace information. See the set tracefile command below.

host Specifies a host to contact over the network.

port Specifies a port number or service name to contact. If not specified, the telnet port (23) is used.

Protocol:

Once a connection has been opened, telnet will attempt to enable the TELNET LINEMODE option. If this fails, then telnet will revert to one of two
input modes: either ``character at a time'' or ``old line by line'' depending on what the remote system supports.

When LINEMODE is enabled, character processing is done on the local system, under the control of the remote system. When input editing or character
echoing is to be disabled, the remote system will relay that information. The remote system will also relay changes to any special characters that
happen on the remote system, so that they can take effect on the local system.

In ``character at a time'' mode, most text typed is immediately sent to the remote host for processing.

In ``old line by line'' mode, all text is echoed locally, and (normally) only completed lines are sent to the remote host. The ``local echo charac
ter'' (initially ``^E'') may be used to turn off and on the local echo (this would mostly be used to enter passwords without the password being
echoed).

If the LINEMODE option is enabled, or if the localchars toggle is TRUE (the default for ``old line by line``; see below), the user's quit, intr, and
flush characters are trapped locally, and sent as TELNET protocol sequences to the remote side. If LINEMODE has ever been enabled, then the user's
susp and eof are also sent as TELNET protocol sequences, and quit is sent as a TELNET ABORT instead of BREAK There are options (see toggle autoflush
and toggle autosynch below) which cause this action to flush subsequent output to the terminal (until the remote host acknowledges the TELNET
sequence) and flush previous terminal input (in the case of quit and intr).

Commands:

The following telnet commands are available. Unique prefixes are understood as abbreviations.

auth argument ...
The auth command controls the TELNET AUTHENTICATE protocol option. If telnet was compiled without authentication, the auth command will
not be supported. Valid arguments are as follows:

disable type Disable the specified type of authentication. To obtain a list of available types, use the auth disable ? command.

enable type Enable the specified type of authentication. To obtain a list of available types, use the auth enable ? command.

status List the current status of the various types of authentication.

Note that the current version of telnet does not support authentication.

close Close the connection to the remote host, if any, and return to command mode.

display argument ...
Display all, or some, of the set and toggle values (see below).

encrypt argument ...
The encrypt command controls the TELNET ENCRYPT protocol option. If telnet was compiled without encryption, the encrypt command will not
be supported.

Valid arguments are as follows:

disable type [input|output]
Disable the specified type of encryption. If you do not specify input or output, encryption of both is disabled. To
obtain a list of available types, use ``encrypt disable ?''.

enable type [input|output]
Enable the specified type of encryption. If you do not specify input or output, encryption of both is enabled. To obtain
a list of available types, use ``encrypt enable ?''.

input This is the same as ``encrypt start input''.

input This is the same as ``encrypt stop input''.

output This is the same as ``encrypt start output''.

output This is the same as ``encrypt stop output''.

start [input|output]
Attempt to begin encrypting. If you do not specify input or output, encryption of both input and output is started.

status Display the current status of the encryption module.

stop [input|output]
Stop encrypting. If you do not specify input or output, encryption of both is stopped.

type type Sets the default type of encryption to be used with later ``encrypt start'' or ``encrypt stop'' commands.

Note that the current version of telnet does not support encryption.

environ arguments...
The environ command is used to propagate environment variables across the telnet link using the TELNET ENVIRON protocol option. All
variables exported from the shell are defined, but only the DISPLAY and PRINTER variables are marked to be sent by default. The USER
variable is marked to be sent if the a or l command line options were used.

Valid arguments for the environ command are:

define variable value
Define the variable variable to have a value of value. Any variables defined by this command are automatically marked for
propagation (``exported''). The value may be enclosed in single or double quotes so that tabs and spaces may be included.

undefine variable
Remove any existing definition of variable.

export variable
Mark the specified variable for propagation to the remote host.

unexport variable
Do not mark the specified variable for propagation to the remote host. The remote host may still ask explicitly for variables
that are not exported.

list List the current set of environment variables. Those marked with a * will be propagated to the remote host. The remote host
may still ask explicitly for the rest.

? Prints out help information for the environ command.

logout Send the TELNET LOGOUT protocol option to the remote host. This command is similar to a close command. If the remote host does not sup
port the LOGOUT option, nothing happens. But if it does, this command should cause it to close the connection. If the remote side also
supports the concept of suspending a user's session for later reattachment, the logout command indicates that the session should be ter
minated immediately.

mode type Type is one of several options, depending on the state of the session. Telnet asks the remote host to go into the requested mode. If the
remote host says it can, that mode takes effect.

character Disable the TELNET LINEMODE option, or, if the remote side does not understand the LINEMODE option, then enter ``character
at a time`` mode.

line Enable the TELNET LINEMODE option, or, if the remote side does not understand the LINEMODE option, then attempt to enter
``old line by line`` mode.

isig ( isig) Attempt to enable (disable) the TRAPSIG mode of the LINEMODE option. This requires that the LINEMODE option be enabled.

edit ( edit) Attempt to enable (disable) the EDIT mode of the LINEMODE option. This requires that the LINEMODE option be enabled.

softtabs ( softtabs)
Attempt to enable (disable) the SOFT_TAB mode of the LINEMODE option. This requires that the LINEMODE option be enabled.

litecho ( litecho)
Attempt to enable (disable) the LIT_ECHO mode of the LINEMODE option. This requires that the LINEMODE option be enabled.

? Prints out help information for the mode command.

open host [[ l] user][ port]
Open a connection to the named host. If no port number is specified, telnet will attempt to contact a telnet daemon at the standard port
(23). The host specification may be a host name or IP address. The l option may be used to specify a user name to be passed to the
remote system, like the l command line option.

When connecting to ports other than the telnet port, telnet does not attempt telnet protocol negotiations. This makes it possible to con
nect to services that do not support the telnet protocol without making a mess. Protocol negotiation can be forced by placing a dash
before the port number.

After establishing a connection, any commands associated with the remote host in /etc/telnetrc and the user's .telnetrc file are exe
cuted, in that order.

The format of the telnetrc files is as follows: Lines beginning with a


Related Topics

Apt Get Commands