Resolving telnet or rlogin problems
These explanations can be useful in solving problems with the telnet or rlogin command.
If you are having trouble with screen distortion in full-screen applications:
telnet subcommands that can help in debugging problems include:
Item | Description |
---|---|
display | Displays set and toggle values. |
toggle | Toggles the display of all network data in hex. |
toggle options | Toggles the display of internal telnet process options. |
If the inetd daemon could execute the telnet service but you still cannot connect using the telnet command, there may be something wrong with the telnet interface.
- Verify that telnet is using the correct terminal type.
- Check the $TERM variable on your machine:
echo $TERM
- Log in to the machine to which you are trying to attach and check the $TERM variable:
echo $TERM
- Check the $TERM variable on your machine:
- Use the telnet interface's debugging capabilities by
entering the telnet command without flags.
telnet tn>
- Type
open
host
where host is the name of the machine. - Press Ctrl-T to get to the
tn%gt;
prompt. - At the
tn>
prompt, typedebug
for debugging mode.
- Type
- Try to connect to another machine using the telnet interface:
Watch the display as the various commands scroll up the screen. For example:telnet bastet Trying... Connected to bastet Escape character is '^T'.
SENT do ECHO SENT do SUPPRESS GO AHEAD SENT will TERMINAL TYPE (reply) SENT do SUPPORT SAK SENT will SUPPORT SAK (reply) RCVD do TERMINAL TYPE (don't reply) RCVD will ECHO (don't reply) RCVD will SUPPRESS GO AHEAD (don't reply) RCVD wont SUPPORT SAK (reply) SENT dont SUPPORT SAK (reply) RCVD do SUPPORT SAK (don't reply) SENT suboption TELOPT_NAWS Width 80, Height 25 RCVD suboption TELOPT_TTYPE SEND RCVD suboption TELOPT_TTYPE aixterm ...
- Check /etc/termcap or /usr/lib/terminfo for
the
aixterm
definition. For example:ls -a /usr/lib/terminfo
- If the
aixterm
definition is missing, add it by building the ibm.ti file. For example:
The tic command is a terminal information compiler.tic ibm.ti
Problems with function and arrow keys can arise when using the rlogin and telnet commands with programs using extended curses. Function and arrow keys generate escape sequences, which are split if too little time is allotted for the entire key sequence. Curses waits a specific amount of time to decide whether an Esc indicates the escape key only or the start of a multibyte escape sequence generated by other keys, such as cursor keys, the action key, and function keys.
If no data, or data that is not valid, follows the Esc in the allotted amount of time, curses decides that the Esc is the escape key, and the key sequence is split. The delay resulting from the rlogin or telnet command is network dependent. Sometimes arrow and function keys work and sometimes they do not, depending on the speed of the network to which you are connecting. Setting the ESCDELAY environment variable to a large value (1000 to 1500) effectively solves this problem.