telnet
telnet, tn, or tn3270 Command
Purpose
Connects the local host with a remote host, using the Telnet interface.
Syntax
{ telnet | tn | tn3270 } [ -d ] [ -n TraceFile ] [ -e TerminalType
] [ Host [ Port ] ]
Description
The telnet command, which is also referred to as the tn or tn3270
command, operates in two different modes: command mode and input mode.
Command Mode
When the telnet command is issued without arguments, it enters command
mode, as indicated by the telnet>, tn>, or the tn3270> prompt.
A user can also enter command mode from input mode by pressing Ctrl-
] for the telnet command, Ctrl-T for the tn command, or Ctrl-C for
the tn3270 command. In command mode, subcommands can be entered to
manage the remote system. Some of these subcommands return you to
the remote session upon completion. For those subcommands that do
not, pressing the Enter key returns you to the remote session.
Note: The default escape sequence for this command is Ctrl-] for
the telnet command, Ctrl-T for the tn command, or Ctrl-C for the tn3270
command. This default can be overridden by changing the TNESC environment
variable.
To enter telnet command mode while connected to a remote host, type
the Telnet escape key sequence. When in command mode, the standard
operating system editing conventions, such as backspace, are available.
Input Mode
When the telnet command is issued with arguments, it performs an open
subcommand with those arguments and then enters input mode. The type
of input mode is either character-at-a-time or line-by-line, depending
on what the remote system supports. In character-at-a-time mode, most
text that is typed is immediately sent to the remote host for processing.
In line-by-line mode, all text is echoed locally and completed lines
are sent to the remote host.
In either input mode, if the toggle localchars subcommand has a value
of True, the user's QUIT, INTR, and FLUSH characters are trapped locally
and sent as Telnet Protocol sequences to the remote host. The toggle
autoflush and toggle autosynch subcommands cause this action to flush
subsequent output to the terminal until the remote host acknowledges
the Telnet sequence and to flush previous terminal input (in the case
of QUIT and INTR characters).
Arabic/Hebrew Support
The telnet, tn, and tn3270 command supports the Arabic and Hebrew
texts, allowing the user to type Arabic or Hebrew characters while
in an emulation session. The Ar_AA locale displays the Arabic characters
in their correct shapes. The following functions support the bidirectional
Arabic and Hebrew texts:
Language Selection
This function allows you to toggle the language layer. Activate the
Arabic/Hebrew language selection with the following key combinations:
Alt+N From an AIX terminal
Esc+N From an ASCII terminal
Alt+N or Esc+N From a Latin AIX terminal
Activate the Latin language layer with the following key combinations:
Alt+L From an Arabic or Hebrew AIX terminal
Esc+L From an ASCII terminal
Alt+L or Esc+L From an AIX terminal
Screen Reverse
This function reverses the screen image and invokes the default language
of the new screen orientation. Thus, if the screen is reversed to
right-to-left, the language is changed to Arabic/Hebrew. If the screen
is reversed to left-to-right, the language is changed to Latin.
If symmetric character swapping is enabled, reversing the screen causes
bidirectional characters to be replaced by their counterparts. For
example, if numeric character swapping is enabled, reversing the screen
causes Hindi numerals to be replaced by their Arabic counterparts
and the Arabic numerals to be replaced by their Hindi counterparts.
Activate screen reverse with the following key combinations:
Alt+S From an Arabic or Hebrew AIX terminal
Esc+S From an ASCII terminal
Alt+S or Esc+S From a Latin AIX terminal
Push/End Push
The Push function allows you to edit text whose direction is opposite
the screen orientation. When you activate this function, the cursor
orientation is reversed, the language layer is changed accordingly,
and a Push segment is created.
The Push function has two secondary modes:
Boundary Mode This mode is activated upon entering the Push mode.
In this mode, the cursor remains in its position while you type additional
characters. The text is pushed in the opposite direction of the screen
orientation.
Edit Mode This mode is activated when the cursor is moved from its
boundary position into the Push segment area. In this mode, you can
edit the text within the Push segment, while typing in the field's
natural direction.
Activate this function with the following key combinations:
Alt+P From an Arabic or Hebrew AIX terminal
Esc+P From an ASCII terminal
Alt+P or Esc+P From a Latin AIX terminal
The End Push function terminates the Push function. The cursor jumps
to the end of the Push segment and its direction changes to the original
direction. You can activate End Push by pressing any field exit keys
such as cursor up, cursor down, or any attention identifier (AID)
key such as the Enter key. You can also activate this function with
the following key combinations:
Alt+E From an Arabic or Hebrew AIX terminal
Esc+E From an ASCII terminal
Alt+E or Esc+E From a Latin AIX terminal
Field Reverse
This function toggles the field orientation to either the opposite
of or the same as the screen orientation. This function does not invert
the text in the field. The cursor orientation is set to the new field
orientation and the language layer is selected accordingly.
For example, if the cursor is in the first logical position of a field
or line when you activate the field reverse function, the cursor skips
to the opposite side of that field or line. This position is now the
first logical position. If the cursor is not in the first position
of the field or line when you activate field reverse function, the
cursor remains in its position and allows natural and correct editing
of the existing text. Activate this function with the following key
combinations:
Alt+R From an Arabic or Hebrew AIX terminal
Esc+R From an ASCII terminal
Alt+R or Esc+R From a Latin AIX terminal
Autopush
This function assists you in typing mixed left-to-right and right-to-left
text. When enabled, reversed segments are automatically initiated
and terminated according to the typed characters or the selected language
layer. Thus, this mode automatically invokes the Push mode and relieves
you of invoking the Push function.
When you type a digit or Latin character in a right-to-left field,
the Autopush function automatically initiates the Push function without
changing the language. If you type additional digits or Latin character,
the Push function continues; otherwise, the Push function automatically
terminates. Thus, you can type Arabic/Hebrew text with embedded digits
or Latin characters without invoking the Push/End Push functions.
When you type an Arabic/Hebrew character in a left-to-right field,
the Autopush function automatically initiates the Push function without
a language change. If you then type a digit or Latin character, the
Autopush function automatically terminates. Thus, you can type Latin
text with embedded Arabic/Hebrew text using the Language Selection
function rather than the Push/End Push functions.
Activate this function with the following key combinations:
Alt+A From an Arabic or Hebrew AIX terminal
Esc+A From an ASCII terminal
Alt+A or Esc+A From a Latin AIX terminal
Field Shape
This function shapes the Arabic characters in the current field or
line. Activate this function with the following key combinations:
Alt+H From an Arabic AIX terminal
Esc+H From an ASCII terminal
Alt+H or Esc+H From a Latin AIX terminal
Field Deshape
This function deshapes Arabic text in the current field or line. Activate
this function with the following key combinations:
Alt+B From an Arabic AIX terminal
Esc+B From an ASCII terminal
Alt+B or Esc+B From a Latin AIX terminal
Contextual Shape Determination
This function determines the shape of an Arabic character based on
the surrounding text. Use the Contextual Shape Determination function
only when typing or editing right-to-left text. This function is terminated
when any of the specific shape selection keys is pressed. This is
the default function. Activate this function with the following key
combinations:
Alt+C From an Arabic AIX terminal
Esc+C From an ASCII terminal
Alt+C or Esc+C From a Latin AIX terminal
Initial Shape Determination
This function shapes Arabic characters in their initial shapes. Activate
this function with the following key combinations:
Alt+I From an Arabic AIX terminal
Esc+I From an ASCII terminal
Alt+I or Esc+I From a Latin AIX terminal
Middle Shape Determination
This function shapes Arabic characters in their middle shapes. Activate
this function with the following key combinations:
Alt+M From an Arabic AIX terminal
Esc+M From an ASCII terminal
Alt+M or Esc+M From a Latin AIX terminal
Isolated Shape Determination
This function shapes Arabic characters in their isolated shapes. Activate
this function with the following key combinations:
Alt+O From an Arabic AIX terminal
Esc+O From an ASCII terminal
Alt+O or Esc+O From a Latin AIX terminal
Final Shape Determination
This function shapes Arabic characters in their final shapes. Activate
this function with the following key combinations:
Alt+Y From an Arabic AIX terminal
Esc+Y From an ASCII terminal
Alt+Y or Esc+Y From a AIX terminal
Miscellaneous Functions
To activate numeric swapping, type the following line at the command
line:
export ARB_NUM_SWAP=1
To activate symmetric swapping, that is, to swap bidirectional characters
such as braces, brackets, and so on, type the following line at the
command line:
export ARB_SYM_SWAP=1
To specify the code page that the host uses, type the following line
at the command line:
export RM_HOST_LANG=IBM-420
Terminal Type Negotiation
The telnet command negotiates the terminal type, using the Telnet
protocol, and it sets the TERM environment variable according to what
has been negotiated.
To override the terminal negotiation from the console, use the EMULATE
environment variable or the -e flag; or invoke the tn3270 command
if you require 3270 emulation. To determine whether terminal-type
negotiation is performed, the following list describes the order of
the telnet command processing:
1. The -e command-line flag. (No negotiation.)
2. The EMULATE environment variable. (No negotiation.)
3. The tn3270 command. (No negotiation.)
4. If steps 1, 2, and 3 are not present, terminal-type negotiation
occurs automatically.
If the client and the server negotiate to use a 3270 data stream,
the keyboard mapping is determined by the following precedence:
$HOME/.3270keys Specifies the user's 3270 keyboard mapping when the
tn or telnet command is invoked. If you are using a color display,
you can also change this file to customize the colors for 3270 displays.
/etc/map3270 Specifies the user's 3270 keyboard mapping when the tn3270
command is invoked. The /etc/map3270 file defines keyboard mapping
and colors for the tn3270 command.
/etc/3270.keys Specifies the base 3270 keyboard mapping for use with
limited function terminals.
Secure Attention Key (SAK) Option
In addition to terminal negotiation, the telnet command allows negotiation
for the Secure Attention Key (SAK) option. This option, when supported,
provides the local user with a secure communication path to the remote
host for tasks such as changing user IDs or passwords. If the remote
host supports the SAK function, a trusted shell is opened on the remote
host when the telnet send sak subcommand is issued. The SAK function
can also be assigned to a single key available in telnet input mode,
using the set sak subcommand.
End-of-Line Convention
The Telnet protocol defines the carriage-return line-feed (CR-LF)
sequence to mean "end-of-line." For terminal input, this corresponds
to a command-completion or end-of-line key being pressed on a user
terminal. On an ASCII terminal, this is the CR key, but it may also
be labeled "Return" or "Enter."
When a Telnet server receives the Telnet end-of-line sequence, CR-LF,
as input from a remote terminal, the effect is the same as if the
user had pressed the end-of-line key on a local terminal.
On ASCII servers, receiving the Telnet sequence CR-LF causes the same
effect as a local user pressing the CR key on a local terminal. CR-LF
and CR-NUL have the same effect on an ASCII server when received as
input over a Telnet connection.
Note: A Telnet user must be able to send CR-LF, CR-NULL, or LF. An
ASCII user must be able to send CR-LF or CR-NULL.
A Telnet user on an ASCII host should have a user-controllable mode
to send either CR-LF or CR-NULL when the user presses the end-of-line
key. The CR-LF should be the default. The Telnet end-of-line sequence,
CR-LF, must be used to send Telnet data that is not terminal-to-computer.
This occurs, for example, when a Telnet server sends output or when
the Telnet protocol incorporates another application protocol.
The telnet command "execs" (using the exec command) the /usr/sbin/login
command to validate a user. This 1) allows all user and device attributes
to take effect on telnet connections and 2) causes telnet connections
to count against the maximum number of login sessions allowable at
a time (determined by the maxlogins attribute). Attributes are defined
in the /etc/security/user and /etc/security/login.cfg files.
Restrictions
* Earlier versions of the telnet command are not compatible
with version 4.1 of the telnet command in sending escapes that emulate
a high function terminal (HFT). Version 4.1 of the telnet command
sends only one escape when the escape key is hit, while prior versions
send two escape characters. Therefore, when the telnet command is
used to connect with a version 4.1 machine from a version 3.1 or earlier
machine or earlier, the escape key produces two escape characters
on the version 4.1 machine. This is fixed in a version 3.1 update.
* The telnet command must allow transmission of 8-bit characters
that are not in binary mode to implement ISO 8859 Latin code page.
This is necessary for internationalization of the TCP/IP commands.
* In order to support new character sets, the following was
added to the hft-m, ibm5081, hft, hft-nam, hft-c, aixterm-m, and aixterm
entries in the terminfo file:
box1=\154\161\153\170\152\155\167\165\166\164\156,
batt1=f1,
box2=\154\161\153\170\152\155\167\165\166\164\156,
batt2=f1md,
font0=\E(B, font1=\E(0,
The font0 and font1 entries are not understood by version 3.1 terminals.
If you work on a version 3.1 machine, use either hft-m-old, hft-old,
hft-nam-old, hft-c-old, aixterm-m-old, or aixterm-old terminfo entries.
A common problem with the new terminfo file entries is that version
3.1 machines display a B character before each typed character when
using the telnet command to connect to a VM system. If you see this,
disconnect the telnet session and set the TERM environment variable
to its corresponding -old terminal type and reconnect. The B character
comes from the font0=\E(B entry. The escape sequence is not understood
by version 3.1 and therefore the B is displayed on the screen.
* The rlogind and telnetd daemons use POSIX line discipline
to change the line discipline on the local tty. If POSIX line discipline
is not used on the local tty, echoing other line disciplines may result
in improper behavior. AIX TCP/IP must have POSIX line discipline to
function properly.
* The mouse cannot be used as an input device with the telnet
command.
* The telnet command does not support the APL data stream.
Environment Variables
The following environment variables can be used with the telnet command:
EMULATE Overrides terminal-type negotiation in the same way as the
-e flag. If the value of the EMULATE environment variable is defined
as vt100 or 3270, the telnet command emulates a DEC VT100 terminal
or 3270 terminal, respectively. If the EMULATE variable is not defined
or has a value of none, the telnet command operates normally. If the
EMULATE variable is set to vt100 or 3270, the TERM environment variable
in the remote login connection should be set to the same value. You
can check this by using the env command after the connection is open.
TNESC Specifies an alternate TELNET escape character, other than the
default, Ctrl-] for the telnet command, Ctrl-T for the tn command,
or Ctrl-C for the tn3270 command. To change the telnet escape sequence,
set TNESC to the octal value of the character you want to use. Then
export TNESC. For example, set TNESC to 35 to change the TELNET escape
sequence to Ctrl-].
MAP3270 Specifies an alternate file that contains the user's 3270
keyboard mapping. The MAP3270 variable must contain the full path
name to the alternate file. Create the alternate file using the same
format as the default /etc/map3270 file.
RM_HOST_LANG Specifies the EBCDIC code page being used on the remote
3270 host. Set the RM_HOST_LANG environment variable to the correct
code page before you telnet (using the telnet command) to a non-English-speaking
3270 host. The default is English. Refer to the "List of Converters"
in AIX Version 4.1 General Programming Concepts: Writing and Debugging
Programs for possible code pages to use. Format the RM_HOST_LANG environment
variable by specifying the /usr/lib/nls/loc/icon directory followed
by the file name for the desired code page.
The telnet command converts characters by using the iconv command.
Users can change the default conversion tables by using the genxlt
command.
Flags
-d Turns debugging mode on.
-e TerminalType Overrides terminal-type negotiation. Possible values
are vt100, 3270, or none.
-n TraceFile Records network trace information in the file specified
by the TraceFile variable.
Subcommands
Before entering each subcommand, press the escape key sequence. The
escape sequence tells the program that non-text information follows.
Otherwise, the program interprets subcommands as text.
For each of the subcommands in the following list, you only need to
type enough letters to uniquely identify the subcommand. (For example,
q is sufficient for the quit subcommand.) This is also true for the
arguments to the display, emulate, mode, set, and toggle subcommands.
The telnet subcommands are:
? [Subcommand] Requests help on telnet subcommands. Without arguments,
the ? subcommand prints a help summary. If a Subcommand variable is
specified, help information is displayed for that subcommand.
close Closes the TELNET connection and returns to telnet command mode
when the open subcommand is used to establish the connection. When
the telnet command is invoked and a host is specified, the close subcommand
closes the TELNET connection and exits the telnet program (identical
to the quit subcommand).
display [Argument] Displays all of the set and toggle values if
no Argument variable is specified; otherwise, lists only those values
that match the Argument variable.
emulate TerminalType Overrides terminal-type negotiation with the
specified terminal type. Possible choices are:
? Prints help information.
3270 Emulates a 3270 terminal.
none Specifies no emulation.
vt100 Emulates a DEC VT100 terminal.
All output received from the remote host is processed by the specified
emulator. The initial terminal type to emulate can be specified through
the EMULATE environment variable or the -e flag to the telnet command.
Note: Only standard ASCII characters are allowed in emulation mode.
mode Type Specifies the current input mode. When the Type variable
has a value of line, the mode is line-by-line. When the Type variable
has a value of character, the mode is character-at-a-time. Permission
is requested from the remote host before entering the requested mode,
and if the remote host supports it, the new mode is entered.
open Host [Port] Opens a connection to the specified host. The Host
specification can be either a host name or an Internet address in
dotted-decimal form. If no Port variable is specified, the telnet
subcommand attempts to contact a TELNET server at the default port.
quit Closes a TELNET connection and exits the telnet program. A Ctrl-D
in command mode also closes the connection and exits.
send Arguments Sends one or more arguments (special character sequences)
to the remote host. Multiple arguments are separated by spaces. The
following arguments can be used:
? Prints help information for the send subcommand.
ao Sends the TELNET AO (Abort Output) sequence, which causes the remote
host to flush all output from the remote system to the local terminal.
ayt Sends the TELNET AYT (Are You There) sequence, to which the remote
system can respond.
brk Sends the TELNET BRK (Break) sequence, which causes the remote
system to perform a kill operation.
ec Sends the TELNET EC (Erase Character) sequence, which causes the
remote host to erase the last character entered.
el Sends the TELNET EL (Erase Line) sequence, which causes the remote
system to erase the line currently being entered.
escape Sends the current telnet escape character. The default escape
sequence is Ctrl-] for the telnet command, Ctrl-T for the tn command,
or Ctrl-C for the tn3270 command.
ga Sends the TELNET GA (Go Ahead) sequence, which provides the remote
system with a mechanism to signal the local system to return control
to the user.
ip Sends the TELNET IP (Interrupt Process) sequence, which causes
the remote system to cancel the currently running process.
nop Sends the TELNET NOP (No Operation) sequence.
sak Sends the TELNET SAK (Secure Attention Key) sequence, which causes
the remote system to invoke the trusted shell. If the SAK is not supported,
then an error message is displayed that reads: Remote side does not
support SAK.
synch Sends the TELNET SYNC sequence, which causes the remote system
to discard all previously typed input that has not yet been read.
This sequence is sent as TCP/IP urgent data.
set VariableValue Sets the specified TELNET variable to the specified
value. The special value off turns off the function associated with
the variable entered. The display subcommand can be used to query
the current setting of each variable. The variables that can be specified
are:
echo Toggles between local echo of entered characters and suppressing
local echo. Local echo is used for normal processing, while suppressing
the echo is convenient for entering text that should not be displayed
on the screen, such as passwords. This variable can only be used in
line-by-line mode.
eof Defines the character for the telnet command. When the telnet
command is in line-by-line mode, entering the eof character as the
first character on a line sends the character to the remote host.
The initial value for the eof character is the local terminal End-Of-File
character.
erase Defines the erase character for the telnet command. When the
telnet command is in character-at-a-time mode and localchars has a
value of true, typing the erase character sends the TELNET EC sequence
to the remote host. The initial value for the erase character is the
local terminal ERASE character.
escape Specifies the telnet escape character, which puts the telnet
command into command mode when connected to a remote host. This character
can also be specified in octal in the TNESC environment variable.
flushoutput Defines the flush character for the telnet command. When
localchars has a value of true, typing the flushoutput character sends
the TELNET AO sequence to the remote host. The initial value for the
flush character is Ctrl-O. If the remote host is running AIX, the
flushoutput variable, unlike the other special characters defined
by the set subcommand, only works in localchars mode since it has
no termio equivalent.
interrupt Defines the interrupt character for the telnet command.
When localchars has a value of true, typing the interrupt character
sends the TELNET IP sequence to the remote host. The initial value
for the interrupt character is the local terminal interrupt (INTR)
character.
kill Defines the kill character for the telnet command. When the telnet
command is in character-at-a-time mode and localchars has a value
of true, typing the kill character sends the TELNET EL sequence to
the remote host. The initial value for the kill character is the local
terminal KILL character.
quit Defines the quit character for the telnet command. When localchars
has a value of true, typing the quit character sends the TELNET BRK
sequence to the remote host. The initial value for the quit character
is the local terminal QUIT character.
sak Defines the Secure Attention Key (SAK) for the telnet command.
When the sak character is entered, the remote system is asked to create
a trusted shell. If the remote host does not support the SAK, this
sequence has no effect.
status Shows the status of the telnet command, including the current
mode and the currently connected remote host.
toggle Arguments Toggles one or more arguments that control how the
telnet command responds to events. Possible values are true and false.
Multiple arguments are separated by spaces. The display subcommand
can be used to query the current setting of each argument. The following
arguments can be used:
? Displays valid arguments to toggle.
autoflush If autoflush and localchars both have a value of true and
the AO, INTR, and QUIT characters are recognized and transformed into
TELNET sequences, the telnet command does not display any data on
the user's terminal until the remote system acknowledges (with a TELNET
timing mark option) that it has processed those TELNET sequences.
The initial value of autoflush is true if the terminal has not done
an stty noflsh, and false if it has.
autosynch If autosynch and localchars are both true, then typing the
INTR or QUIT character sends that character's TELNET sequence, followed
by the TELNET SYNC sequence. This procedure causes the remote host
to discard all previously typed input until both of the TELNET sequences
have been read and acted upon. The initial value of this toggle is
false.
crmod Toggles carriage return mode. When set to true, most carriage
return characters received from the remote host are mapped into a
carriage return followed by a line feed. This mode does not affect
the characters typed by the user, only those received from the remote
host. This mode is useful when the remote host sends only a carriage
return and not a line feed. The initial value of this toggle is false.
debug Toggles debugging at the socket level. The initial value of
this toggle is false.
localchars Determines the handling of TELNET special characters. When
this value is true, the ERASE, FLUSH, INTERRUPT, KILL, and QUIT characters
are recognized locally and transformed into the appropriate TELNET
control sequences (EC, AO, IP, BRK, and EL, respectively). When this
value is false, these special characters are sent to the remote host
as literal characters. The initial value of localchars is true in
line-by-line mode and false in character-at-a-time mode.
netdata Toggles the display of all network data (in hexadecimal format).
The data is written to standard output unless a TraceFile value is
specified with the -n flag on the telnet command line. The initial
value of this toggle is false.
options Toggles the display of internal TELNET Protocol processing
options, such as terminal negotiation and local or remote echo of
characters. The initial value of this toggle is false, indicating
that the current options should not be displayed.
lineterm Toggles the default end-of-line terminator to CR-LF (ASCII
carriage-return line-feed). A telnet client running on an ASCII host
should have the user configurable option to send either the CR-NUL
or CR-LF terminator when the user presses the end-of-line key. The
initial value of this toggle is false.
z Suspends the TELNET process. To return to the TELNET process, use
the fg built-in command of the csh or ksh command.
Note: The z subcommand has the same effect as a Ctrl-Z key sequence
for any other process. It suspends Telnet execution and returns you
to your original login shell.
Examples
In the following examples, if you enter the tn command instead of
the telnet command, the command mode prompt is displayed as tn>.
1. To log in to the remote host host1 and perform terminal negotiation,
enter:
telnet host1
2. To log in to host1 as a vt100 terminal (no terminal type negotiation),
choose one of the following methods:
a. Use the following commands to set the EMULATE environment variable
for this login session, then enter the telnet command:
EMULATE=vt100; export EMULATE
telnet host1
b. Use the -e flag to set the terminal type for this telnet session
only:
telnet -e vt100 host1
3. To log in to a remote host and then check the status of the telnet
program, enter:
telnet host3
When the login prompt appears, enter your login ID and password. Press
the Ctrl-T key sequence to receive the telnet> prompt. Enter the
following at the telnet> prompt:
status
Information similar to the following is displayed on your screen:
Connected to host3.
Operating in character-at-a-time mode.
Escape character is '^]'.
Upon completion of the status subcommand, press the Enter key to return
to the remote prompt.
Once you have completed your login, you can issue commands. To log
out of the system and close the connection, press the Ctrl-D key sequence,
or exit.
4. To log in to a remote host using the tn3270 command, enter:
tn3270 hostname
The host login screen should be displayed. You can now enter your
login ID and password. Once you have completed your login, you can
issue commands. To log out of the system and close the connection,
press Ctrl-D or exit.
Implementation Specifics
Software Product/Option: Base Operating System/ AIX 3.2 to 4.1 Compatibility
Links
Standards Compliance: OSF/1, OSF Level 3, BSD 4.3
Files
/etc/3270.keys Defines base 3270-keyboard mapping for use with limited
function terminals.
Related Information
The env command, login command, rexec command, rlogin command, rsh
command.
The telnetd daemon.
The map3270 file format, .3270keys file format.
Network Overview in AIX Version 4.1 System User's Guide: Communications
and Networks.
Connecting a Local Host to a Remote Host in AIX Version 4.1 System
User's Guide: Communications and Networks.
=================================================================
=================================================================
telnetd Daemon
Purpose
Provides the server function for the TELNET protocol.
Syntax
/usr/sbin/telnetd [ -n ] [ -s ]
Description
Note: The telnetd daemon is normally started by the inetd daemon.
It can also be controlled from the command line, using SRC commands.
The /usr/sbin/telnetd daemon is a server that supports the Defense
Advanced Research Product Agency (DARPA) standard Telnet Protocol
(TELNET). Changes to the telnetd daemon should be made using the System
Management Interface Tool (SMIT).
Changes to the telnetd daemon can be made using the System Management
Interface Tool (SMIT) or System Resource Controller (SRC), by editing
the /etc/inetd.conf or /etc/services file. Entering telnetd at the
command line is not recommended. The telnetd daemon is started by
default when it is uncommented in the /etc/inetd.conf file.
The inetd daemon get its information from the /etc/inetd.conf file
and the /etc/services file.
After changing the /etc/inetd.conf or /etc/services file, run the
refresh -s inetd or kill -1 InetdPID command to inform the inetd daemon
of the changes to its configuration file.
When a telnet session is started, the telnetd daemon sends TELNET
options to the client (remote) host to indicate an ability to perform
options.
Terminal Negotiation
The telnetd daemon requests the terminal type from the client host.
On receipt, the telnetd daemon checks whether the indicated type is
supported on the local system. If not, the daemon requests a terminal
type again.
This terminal type negotiation continues until the remote client sends
an acceptable terminal type or until the client sends the same type
twice in a row, indicating that it has no other types available. When
necessary, the telnetd daemon refers to the /etc/telnet.conf file
to translate a client's terminal-type strings into terminfo file entries.
Note: Since the telnetd daemon allows the sending and receiving of
8-bit ASCII, NLS is supported.
If the remote client sends the TELNET SAK command, the telnetd daemon
passes the local SAK characters through the PTY to invoke the trusted
shell.
The telnetd daemon supports the following TELNET options:
* Binary
* Echo/no echo
* Support SAK
* Suppress go ahead
* Timing mark
* Negotiate About Window Size (NAWS)
The telnetd daemon also recognizes the following options for the remote
client:
* Binary
* Suppress go ahead
* Echo/no echo
* Terminal type
The telnetd daemon should be controlled using the System Management
Interface Tool (SMIT) or by changing the /etc/inetd.conf file. Entering
telnetd at the command line is not recommended.
Manipulating the telnetd Daemon with the System Resource Controller
The telnetd daemon is a subserver of the inetd daemon, which is a
subsystem of the System Resource Controller (SRC). The telnetd daemon
is a member of the tcpip SRC subsystem group. This daemon is enabled
by default in the /etc/inetd.conf file and can be manipulated by the
following SRC commands:
startsrc Starts a subsystem, group of subsystems, or a subserver.
stopsrc Stops a subsystem, group of subsystems, or a subserver.
lssrc Gets the status or a subsystem, group or subsystems, or a subserver.
Flags
-n Disables transport-level keep-alive messages. Messages are enabled
by default.
-s Turns on socket-level debugging.
Examples
Note: The arguments for the telnetd daemon can be specified by using
SMIT or by editing the /etc/inetd.conf file.
1. To start the telnetd daemon, enter the following:
startsrc -t telnet
This command starts the telnetd subserver.
2. To stop the telnetd daemon normally, enter the following:
stopsrc -t telnet
This command allows all pending connections to start and existing
connections to complete but prevents new connections from starting.
3. To force stop the telnetd daemon and all telnetd connections, enter
the following:
stopsrc -t -f telnet
This command terminates all pending connections and existing connections
immediately.
4. To display a short status report about the telnetd daemon, enter
the following:
lssrc -t telnet
This command returns the daemon's name, process ID, and state (active
or inactive).
Implementation Specifics
This daemon is part of TCP/IP in Network Support Facilities in Base
Operating System (BOS) Runtime.
File
terminfo Describes terminal by capability.
Related Information
The kill command, lssrc command, refresh command, startsrc command,
stopsrc command, telnet command.
The /etc/inetd.conf file format, /etc/telnet.conf file format.
The pty special file.
Telnet Protocol (TELNET) in AIX Version 4.1 System Management Guide:
Communications and Networks.
TCP/IP Daemons in AIX Version 4.1 System Management Guide: Communications
and Networks.
=================================================================
=================================================================
telnetd Daemon
Purpose
Provides the server function for the TELNET protocol.
Syntax
/usr/sbin/telnetd [ -n ] [ -s ]
Description
Note: The telnetd daemon is normally started by the inetd daemon.
It can also be controlled from the command line, using SRC commands.
The /usr/sbin/telnetd daemon is a server that supports the Defense
Advanced Research Product Agency (DARPA) standard Telnet Protocol
(TELNET). Changes to the telnetd daemon should be made using the System
Management Interface Tool (SMIT).
Changes to the telnetd daemon can be made using the System Management
Interface Tool (SMIT) or System Resource Controller (SRC), by editing
the /etc/inetd.conf or /etc/services file. Entering telnetd at the
command line is not recommended. The telnetd daemon is started by
default when it is uncommented in the /etc/inetd.conf file.
The inetd daemon get its information from the /etc/inetd.conf file
and the /etc/services file.
After changing the /etc/inetd.conf or /etc/services file, run the
refresh -s inetd or kill -1 InetdPID command to inform the inetd daemon
of the changes to its configuration file.
When a telnet session is started, the telnetd daemon sends TELNET
options to the client (remote) host to indicate an ability to perform
options.
Terminal Negotiation
The telnetd daemon requests the terminal type from the client host.
On receipt, the telnetd daemon checks whether the indicated type is
supported on the local system. If not, the daemon requests a terminal
type again.
This terminal type negotiation continues until the remote client sends
an acceptable terminal type or until the client sends the same type
twice in a row, indicating that it has no other types available. When
necessary, the telnetd daemon refers to the /etc/telnet.conf file
to translate a client's terminal-type strings into terminfo file entries.
Note: Since the telnetd daemon allows the sending and receiving of
8-bit ASCII, NLS is supported.
If the remote client sends the TELNET SAK command, the telnetd daemon
passes the local SAK characters through the PTY to invoke the trusted
shell.
The telnetd daemon supports the following TELNET options:
* Binary
* Echo/no echo
* Support SAK
* Suppress go ahead
* Timing mark
* Negotiate About Window Size (NAWS)
The telnetd daemon also recognizes the following options for the remote
client:
* Binary
* Suppress go ahead
* Echo/no echo
* Terminal type
The telnetd daemon should be controlled using the System Management
Interface Tool (SMIT) or by changing the /etc/inetd.conf file. Entering
telnetd at the command line is not recommended.
Manipulating the telnetd Daemon with the System Resource Controller
The telnetd daemon is a subserver of the inetd daemon, which is a
subsystem of the System Resource Controller (SRC). The telnetd daemon
is a member of the tcpip SRC subsystem group. This daemon is enabled
by default in the /etc/inetd.conf file and can be manipulated by the
following SRC commands:
startsrc Starts a subsystem, group of subsystems, or a subserver.
stopsrc Stops a subsystem, group of subsystems, or a subserver.
lssrc Gets the status or a subsystem, group or subsystems, or a subserver.
Flags
-n Disables transport-level keep-alive messages. Messages are enabled
by default.
-s Turns on socket-level debugging.
Examples
Note: The arguments for the telnetd daemon can be specified by using
SMIT or by editing the /etc/inetd.conf file.
1. To start the telnetd daemon, enter the following:
startsrc -t telnet
This command starts the telnetd subserver.
2. To stop the telnetd daemon normally, enter the following:
stopsrc -t telnet
This command allows all pending connections to start and existing
connections to complete but prevents new connections from starting.
3. To force stop the telnetd daemon and all telnetd connections, enter
the following:
stopsrc -t -f telnet
This command terminates all pending connections and existing connections
immediately.
4. To display a short status report about the telnetd daemon, enter
the following:
lssrc -t telnet
This command returns the daemon's name, process ID, and state (active
or inactive).
Implementation Specifics
This daemon is part of TCP/IP in Network Support Facilities in Base
Operating System (BOS) Runtime.
File
terminfo Describes terminal by capability.
Related Information
The kill command, lssrc command, refresh command, startsrc command,
stopsrc command, telnet command.
The /etc/inetd.conf file format, /etc/telnet.conf file format.
The pty special file.
Telnet Protocol (TELNET) in AIX Version 4.1 System Management Guide:
Communications and Networks.
TCP/IP Daemons in AIX Version 4.1 System Management Guide: Communications
and Networks.
=================================================================
=================================================================
telnet.conf File Format for TCP/IP
Purpose
Translates a client's terminal-type strings into terminfo file entries.
Description
The telnetd daemon uses the /etc/telnet.conf file during terminal
negotiation to translate a client's terminal-type strings into terminfo
file entries. The telnet.conf file is used when a client's terminal
does not correspond directly to a terminfo file entry. If this is
the case, the telnet.conf file can map standard terminal names (defined
in RFC-1060 Assigned Numbers) to terminfo file entries that the system
can emulate.
Each line in the telnet.conf file can contain up to 255 characters.
Lines beginning with a # (pound sign) are comment lines.
The telnet.conf file is structured in a two-column line format, with
dashes separating the items in each column. The first column specifies
a manufacturer, model type, and optional additional information. The
second column specifies the terminfo file entry that corresponds to
the manufacturer, model, and optional information in the first column.
The items in the first column can be either uppercase or lowercase.
The items in the second column must be lowercase. RFC-1060 specifies
the first terminal type in the telnet.conf file. The format for the
telnet.conf file is:
Manufacturer-Model-Options TerminfoModel-Options
Security
Suggested permissions for the telnet.conf file are rw-rw-r-- or 664.
Suggested ownership is root for owner and system for group.
Examples
Sample telnet.conf entries might look like the following:
DEC-VT100-AM vt100-am
diablo-1620-m8 1620-m8
h-19-a 19-a
TI-800 ti-800
In the first entry, the manufacturer is DEC (Digital Equipment Corporation),
the model is VT100, and the AM option specifies automargin. In the
second entry, the manufacturer is diablo, the model is 1620, and the
m8 option specifies a left margin of 8 columns. In the third entry,
the manufacturer is h (Heath), the model is 19, and the a option specifies
ANSII mode. In the fourth entry, the manufacturer is TI (Texas Instruments),
and the model is 800; no options are specified. For additional terminfo
options, refer to the *.ti files in the /usr/lib/terminfo directory.
Implementation Specifics
This file is part of TCP/IP in Network Support Facilities in Base
Operating System (BOS) Runtime.
Files
terminfo Describes terminal by capability.
Related Information
The telnet command.
The telnetd daemon.