Many users are not familiar with AIX telnet commands. Therefore, here we summarize and categorize these types of commands so that you can refer to this article and obtain the necessary information. To override terminal negotiation from the console, use the EMULATE environment variable or the -e flag; if 3270 emulation is needed, invoke the tn3270 command. To determine whether terminal type negotiation has occurred, the following list describes the order in which AIX telnet commands are processed:
- The -e command-line flag. (No negotiation.)
- The EMULATE environment variable. (No negotiation.)
- The tn3270 command. (No negotiation.)
If steps 1, 2, and 3 do not exist, terminal type negotiation occurs automatically.
If the client and server negotiate to use a 3270 data stream, the keyboard mapping is determined by the following priorities:
- $HOME/.3270keys specifies the user's 3270 keyboard mapping when invoking the tn or AIX telnet command. If using a color display, this file can also be modified to customize the colors of the 3270 display.
- /etc/map3270 specifies the user's 3270 keyboard mapping when invoking the tn3270 command. The /etc/map3270 file defines the keyboard mapping and colors for the tn3270 command.
- /etc/3270.keys specifies the basic 3270 keyboard mapping for limited-function terminals.
Security Attention Key (SAK) Option
In addition to terminal negotiation, the telnet command allows for Security Attention Key (SAK) negotiation options. When this option is supported, it provides a secure communication path to the remote host for local users performing tasks such as changing user IDs and passwords. If the remote host supports SAK functionality, issuing the telnetsend sak subcommand opens a trusted shell on the remote host. SAK functionality can also be assigned to a single key variable 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 represent end-of-line ("end-of-line"). For terminal input, it corresponds to pressing the command completion or end-of-line key on the user's terminal. On ASCII terminals, this is the CR key, but it may also be labeled "Return" or "Enter".
When the telnet server receives the telnet end-of-line sequence, i.e., CR-LF entered from a remote terminal, the effect is the same as if the user pressed the end-of-line key on their local terminal.
On an ASCII server, receiving the telnet sequence CR-LF has the same effect as a local user pressing the CR key on their local terminal. On an ASCII server, CR-LF and CR-NUL have the same effect when received as input from a telnet connection.
Note: Telnet users must be able to send CR-LF, CR-NULL, or LF. ASCII users must be able to send CR-LF or CR-NULL.
On an ASCII host, when the user presses the end-of-line key, Telnet users should have a user-controllable way to send CR-LF or CR-NULL. CR-LF should be the default. The Telnet end-of-line sequence, CR-LF, must be used to send telnet data that is not from the terminal to the computer. For example, this happens when the telnet server sends output or when the telnet protocol encapsulates another application protocol.
The AIX telnet command "executes" (using the exec command) the /usr/sbin/login command to authenticate users. It 1) allows all user and device attributes to take effect over the telnet connection, and 2) registers the telnet connection session count up to the maximum allowed number (determined by the maxlogins attribute). These attributes are defined in the /etc/security/user and /etc/security/login.cfg files.
Limitations
When sending escape sequences for emulating high-function terminals (HFT), earlier versions of the telnet command are incompatible with AIX V4 and later versions of the telnet command. AIX V4 and later versions of the telnet command send only one escape when hiding the escape key, whereas earlier versions send two escape characters.
The telnet command must allow the transmission of 8-bit characters from ISO 8859 Latin code pages without binary transmission. This is necessary for the internationalization of TCP/IP commands.
To support new character sets, the following content has been added to the hft-m, ibm5081, hft, hft-nam, hft-c, aixterm-m, and aixterm entries in the terminfo file:
```
box1=154161153170152155167165166164156, batt1=f1,
box2=154161153170152155167165166164156, batt2=f1md,
font0=E(B, font1=E(0,
```
rlogind and telnetd daemons use POSIX line discipline to change the line discipline on the local tty. If POSIX line discipline is not used for the local tty, echoing other line disciplines may result in incorrect behavior. AIX TCP/IP requires POSIX line discipline to function correctly.
Using the telnet command does not allow the mouse to be used as an input device.
The AIX telnet command does not support APL data streams.
Article source: [Eden Network](http://www.edenw.com/tech/net/col/2010-07-20/4818.html)