In a similar manner to ftp allowing a user to transfer files across the Internet, telnet allows users to log onto and work on remote machines as if they were sitting at one of its terminals. How usable this remote login is depends on how well the machines are connected and how well your terminal is recognized by the foreign machine. As the distance between machines increases, and the number of networks that must be interconnected (the number of hops), the response time between a user entering a character and the remote machine responding to it increases. You can measure this round trip time with the ping command as discussed in Chapter 2. If the ping times are greater than 500 milliseconds, the remote machine will seem unresponsive and you will find it hard to be productive. Slow connections are common when using machines at far-removed different sites. If you are of the patient type, your telnet session will be usable but editing may be difficult.
Telnet has very few options and is simple to use. Like ftp you
just give the name of the machine you want to connect to as an
% telnet itasca.thomas.hal.com Login to the machine itasca. Connected to itasca.thomas.hal.com. Escape character is '^]'. The escape character may be ^] or t. SunOS UNIX (itasca) login: Now we can login.
Once we get the login: prompt, the login is the same as from any other terminal. Telnet will automatically try to set your TERM variable for you so the foreign machine knows your terminal type, but nevertheless, you may have to correct it if the remote machine does not know about the name it was sent as your terminal type.
To end the telnet session, log off the remote machine. If the
connection is hung, that is, you have stopped getting a
response, you will not be able to log off and so you should use the
telnet escape character to get a telnet prompt and then quit the
telnet session. The telnet escape character may be either
^] or ^t. You will also get the telnet prompt if telnet does
not recognize the remote hostname you use. In this case you are not
connected to the foreign machine but are just running telnet. You can
quit telnet or tell telnet to open some other
% telnet itsca.thomas.hal.com Itasca is misspelled. itsca: unknown host No host by this name. telnet> open itasca.thomas.hal.com Use the open command. Trying... It takes a while. Connected to itasca.thomas.hal.com. Escape character is '^]'. SunOS UNIX (itasca) login: ^] Use the escape character to get to the telnet prompt. telnet> quit Use quit to end the session. Connection closed. % Telnet session ended.