Telnet It Like It Is
Telnetting (in English, you can “verb” any word you want) involves no more than typing telnet and the name of the computer you want to log in to:telnet pumpkin
UNIX tells you that it is making the connection and then gives the usual login prompt: Trying...
Connected to pumpkin.bigcorp.com.
Escape character is ‘^]’.
FreeBSD 4.8 (pumpkin.bigcorp.com)
login:
At the login prompt, you type your username and then your password. After the other computer connects, you log in exactly as though you are sitting at the other computer. In the following example, we typed john1 as our username and then gave our secret password: login: johnl
Password:
Last login: Thu Oct 3:03:58 from squash
FreeBSD 4.8-RELEASE (PUMPKIN) #0: Thu Jul 24 14:49:39 EDT 2003
Please confirm (or change) your terminal type.
TERM = (xterm
If you use a full-screen program, such as the UNIX text editors emacs and vi or the mail programs elm and Pine, you have to set your terminal type. This problem shouldn’t exist in the first place, but it does, so you have to deal with it.The problem is that about a dozen different conventions exist for screen controls such as clear screen and move to position (x,y). The program you’re using on the remote host has to use the same convention your local terminal program does.If the conventions are not the same, you get garbage (funky-looking characters) on-screen when you try to use a full-screen program. In most cases, the remote system asks you which terminal type to use. The trick is knowing the right answer. Here are a few hints to help you find out:
If you’re using the X Window system, with or without Motif, the answer is more likely to be VT-100, a popular terminal from the 1970s that became a de facto standard. You may also try xterm, the name of the standard X program that does terminal emulation.
If you’re using a PC and an emulation program, the best answer is usually ANSI because most PC terminal programs use ANSI terminal conventions. (ANSI stands for the American National Standards Institute. One of its several thousand standards defines a set of terminal-control conventions that MS-DOS PCs — which otherwise wouldn’t know an ANSI standard if they tripped over one — invariably use.)
In places where a great deal of IBM equipment is used, the terminal type may be 3101, an early IBM terminal that was also popular.
The ANSI and VT-100 conventions are not much different from each other, so if you use one and your screen is only somewhat screwed up, try the other.
If the other computer asks you what type of terminal you’re using, give the answer appropriate to the terminal you’re using. (If you’re using an X terminal window, it’s xterm . Try VT-100, ANSI, or TTY if you’re using a dumb terminal or PC.) The normal way to leave telnet is to log out from the other computer:
logout
UNIX gives you the following message to tell you that the other computer has hung up the phone, so to speak: Bye Bye
Connection closed by foreign host.
Sometimes the other computer is recalcitrant and doesn’t want to let you go. Remember that you’re in control. To force your way out, you first must get the attention of the telnet program by pressing Ctrl+] (that’s a right square bracket). A few versions of telnet use a different escape character to get telnet ’s attention. (It tells you which character when you first connect to the other system.) After you get telnet ’s attention, type quit to tell telnet to wrap things up and return to the shell: Ctrl-]
telnet> quit