Roadmap96: MAP11 - Telnet | WebReference

Roadmap96: MAP11 - Telnet

Roadmap96

RM 01 02 03 04 05 06 07 08 09 10
11 12 13 14 15 16 17 -B 18 19 20
21 22 23 24 25 XT XT 26 XT 27   

MAP11: TELNET

"Thanks to the interstate highway system, it is now possible to travel across the country from coast to coast without seeing anything."
-- Charles Kuralt, On the Road

We are about to enter a new section of this workshop. In the past few lessons we have talked about communicating on a one-to-one basis (e-mail) and on a one-to-many basis (LISTSERV and Usenet). Today, I am going to show you how to log in to other computers around the world and take full advantage of the public programs and services that these other computers offer.

There is some bad news, though. Some of you, especially a good number of you with "level one" Internet access, do not have access to TELNET. If this is true for you, please accept my apologies. I promise to make it up to you next week when I show you File Transfer Protocol -- and besides, you can always take today's lesson and tomorrow's lesson and bug your local Internet Service Provider into offering TELNET (you can also save this lesson for the day when you do have TELNET access).

With TELNET, the commands that you type on your keyboard are sent from your terminal to your local Internet Service Provider, and then from your provider to the remote computer that you have accessed. Unlike the LISTSERV commands that you sent last week that took CENTURIES to process (okay, a *slight* exaggeration), TELNET commands (usually) travel so fast that you cannot even tell that you are using a remote computer.

So what can you do with this ability to login to remote computers? If your local Internet Service Provider allows it, it is possible for you to TELNET into your account from another city and check your e-mail while you are on vacation or away on business. You can also TELNET into huge databases to do research, or even TELNET into libraries around the world to check if they have a certain book that you are looking for. TELNET also offers an easy entry into the world of Gophers and the World Wide Web for those people who may not otherwise have access to these tools.

In MAP04, I showed you that an Internet address for a user looked something like:

user@machine.domain

Well, since we are no longer interested in the person -- we want to access the computer, not the person -- we can throw away both the "user" and the "@" part. All we care about now is the stuff *after* the "@."

TELNET addresses look something like this:

          seabass.st.usm.edu         cybernet.cse.fau.edu
          bbhost.hq.eso.org          fedworld.gov
          128.118.36.5               192.160.13.1

Gee ... that's easy. Also notice that TELNET addresses can be in domain name format (e.g., seabass.st.usm.edu) or in IP address format (e.g., 120.118.36.5). (Note: both the domain name system and the IP address system were discussed in MAP04: E-MAIL).

You may also see TELNET addresses with numbers stuck on the END of them. Those numbers are "port" numbers. Port numbers do not have anything to do with hardware ports on the computer. Instead they are (sort of) a way for you to tell the remote computer which program or server you want it to pull up. A TELNET address with a port number allows you to not only access a remote computer, but to also pull up a specific program or server on that remote computer (BTW, the standard port number is port 23):

          seabass.st.usm.edu 23           cybernet.cse.fau.edu 2010
          bbhost.hq.eso.org 6969          fedworld.gov 4242
          128.118.36.5 23                 192.160.13.1 66

We seem to have the addresses down pat. Now for the fun stuff!

There are seven steps to a successful TELNET session. These steps are all based on simple common sense, and I will explain them all in a minute. But first, here are the seven steps:

  1. Start up the TELNET program;
  2. Give the TELNET program an address to connect to (some really nifty TELNET packages allow you to combine steps 1 and 2 into one simple step!);
  3. Make a note of what the "escape character" is;
  4. Log in to the remote computer;
  5. Set the "terminal emulation;"
  6. Play around on the remote computer; and
  7. Quit.

Now let's talk about each of these steps. There are a lot of different TELNET software programs around, but each of these programs operates on the same basic principles. (BTW, my explanation may be a little "mainframe-y" but you will soon discover that you can easily translate my explanation so that you can use TELNET in Windows or on a Macintosh.)

Starting the TELNET program is easy. All most of you will have to do is type the word TELNET on your command line, and the program will start right up. If you are using Windows or a Macintosh (or an equivalent), double-click on the TELNET icon.

The second step is to give the TELNET program the address of the computer that you want to access. This is where the programs start to differ. Some programs will automatically ask you to enter the address of the remote host but most will not. If your program does not automatically ask you for the address, you need to type

open <site address> <port number>

on the command line. For example, to get TELNET access to YALEINFO.YALE.EDU 7000, you would type OPEN YALEINFO.YALE.EDU 7000. (If you are using Windows or a Mac, the OPEN command may be located on a pull-down menu.) If you do not include the port number, TELNET will automatically assume that you want to connect to port 23.

Note that some TELNET programs require that you use different notations when you give an explicit port number. Examples of these notations are:

     YALEINFO.YALE.EDU 7000       This is the most common.
     YALEINFO.YALE.EDU:7000       TrmpTeL uses this.
     YALEINFO.YALE.EDU#7000
     YALEINFO.YALE.EDU/PORT=4000  VAX/VMS uses this notation.
     "YALEINFO.YALE.EDU 7000"     The quotes are required.

Thus, if your TELNET program appears not to accept the simple address with port number (the first example above), you might try one of these other formats or else ask your ISP for some help. By the way, the same notations that you see above may (or may not) be used in the "one step" format that we'll talk about in the next paragraph.

Remember when I said that some nifty TELNET programs allow you to start-up the TELNET program and access the address all in one easy step? Instead of doing the two steps I just went over, you may be able to just type

telnet <site address> <port number>

on the command line (for example: TELNET YALEINFO.YALE.EDU 7000).

After you have told TELNET which computer you want it to access, and right before you gain access to the remote computer's login screen, you will see something like this:

     telnet YALEINFO.YALE.EDU 7000      Trying 130.132.21.53 Port 7000
     Connected to YALEINFO.YALE.EDU     Escape character is ...

This tells you that your TELNET program is trying to access the

YALEINFO.YALE.EDU 7000 address, gives the IP address for YALEINFO (remember those from MAP04?), tells you when you are connected, and gives you the escape character. REMEMBER THE ESCAPE CHARACTER! You are going to need it in a second. :)

The next step is to log in to the remote computer. Everyone should know how to log in to a computer by now. ;) <== a winking smiley

If you are accessing a public site, the "login" -- the "password" that you need to access the remote computer -- will probably be publicly known. For example, the next lesson (MAP12) will tell you how to retrieve a list that contains HUNDREDS of TELNET sites, including their addresses and logins. Some public sites even TELL you what the login is when you TELNET to them! Heck, some TELNET sites are wide open and do not require a login or password at all!!

The fifth step is to set the terminal emulation. All this means is that you are going to tell the remote site how data should be shown on your screen. The most common terminal emulation setting is VT100, which is the standard for terminal-based communications. If you do not have a VT100 terminal, or a terminal that can pretend it's a VT100 terminal, you may have to set your terminal emulation to either your correct terminal type or, if you do not know your correct terminal type, to a "dumb" terminal emulation.

Fortunately, some TELNET sites automatically set the terminal emulation for you, so you do not even have to worry about it. If you end up with a screen full of gibberish, chances are you did not use the correct terminal emulation setting. Your best bet if this happens is to disconnect from the site and try again.

I think you can figure out the sixth step -- play around on the remote computer -- all by yourself. :)

The final step is to quit. Some sites are nice and tell you how to do this but most expect you to figure out how to quit on your own. If you can figure out the command that the remote host wants you to use to quit, you should use that command to quit. This gives the remote host a better chance of "cleaning up" after your session, possibly even saving some information that you have generated. The most common commands used to quit a TELNET session are "exit", "bye", or "quit." Sometimes, however, you cannot find a standard way to exit.

That is where the escape character comes in! Remember that once you access the remote computer, every keystroke of yours will be carried out not on your computer but on the remote computer! Typing the escape character (usually the control key and the right bracket key (]) pressed at the same time) temporarily interrupts your TELNET session and puts you into the TELNET command mode.

Once you are in the command mode, you can choose from several commands:

     CLOSE          Closes your TELNET connection to the remote
                    computer and either returns you to the command
                    mode (if you started in the command mode) or quits 
                    TELNET.
 
     QUIT           Quits the TELNET program; if you are connected to 
                    a remote computer, QUIT will disconnect you from 
                    the remote computer and then quit TELNET.
 
     SET ECHO       If you cannot see what you are typing, or if you 
                    type and see double, this command should take care 
                    of the problem.
 
     <ENTER>       (or <RETURN>) Pressing the enter or return key will 
                   take you out of TELNET command mode and return you 
                   to your TELNET session.
 
     OPEN          Opens a connection to a remote computer.
 
     ? or HELP     Gives you some help if you get lost.
 

So, if you are in the middle of a TELNET session and you decide to quit, you would type the escape character to enter the TELNET command mode, and then type the word QUIT.

One last thing and I will let you go: regular TELNET does not work if you are trying to TELNET to an IBM 3270 mainframe computer. You will have to use TN3270 instead. It works just like TELNET, only the keys on your keyboard may change a little (IBM uses something called map3270 to lay out the keys, and uses a *lot* of function keys ... and I mean A LOT -- like around 24!).

 

HOMEWORK

Study this lesson carefully. Tomorrow I am going to tell you how to get a huge list of TELNET addresses, and then turn you loose to wreak havoc on the Internet. :)

Also, a not-so-subtle hint: we just ended one section of the workshop and entered a new one. What does the teacher usually give you when a class section ends?

Study hard. >:) <===== that's a devil smiley


Start Lesson Twelve | Go to the Roadmap96 Syllabus | Go to the Roadmap96 Homepage


Originally written by Patrick Douglas Crispen