Problem
On busy or slow networks, telnet/rlogin sessions are troublesome when
typing in shell commands. There are delays in echoing of characters
back to the screen. In some cases, incoming and outgoing bandwidth is
not the same, and while output from commands arrives promptly, any
characters typed at the keyboard may take a painfully long time to
echo back. Cause
In a typical telnet or rlogin session, the local and remote systems are set up so that each character typed as input on the client must travel over the network to the server, where it is then echoed back to the client. This is normal, as it is usually the responsibility of the pseudo-tty which is connected to the telnetd process and the login shell on the remote system to handle most character processing, including echoing of characters typed at the command line.
Solution
Change the appropriate stty settings to enable local character
echoing. In order to do this, perform the following steps:1) Before starting your telnet session, do a "tty" command on the
local tty to determine what tty you are on. For example,
"/dev/pts/12" (used hereafter).2) Start the telnet session normally.3) On another local tty, do the following:
stty echo icrnl onlcr icanon < /dev/pts/124) Within the telnet session, do the following:
stty -onlcr -echoNOTE: This is not a perfect solution to the type-ahead problem, but it might
still be fairly valuable, depending on your preferences. The drawback
is that with local character echoing, you cannot do character-at-a-
time I/O on the remote side, which means that any application which
needs this (such as vi, scoadmin, just about any other curses or
screen-based app), even vi or editor modes in ksh are broken.
Therefore, the work around for this is to start two telnet sessions;
one for just typing commands (without vi or emacs-type editing), and
the other for editing or screen-based apps (which would, of course,
still have the annoying echo delays). This is a compromise but will
still be useful in many situations. System Administrators typically
type large numbers of commands when troubleshooting a system, and the
type-ahead might otherwise be a major annoyance.