TI Column Logo
May/June 1993

Logging on to a remote computer (using telnet and ftp commands)

In the last issue of THE INSTITUTE, we discussed how to use e-mail to send files to another computer, and how to encode non-ASCII files so that they can be sent without the special embedded control codes that can cause a lot of havoc in the e-mail system [March/April, p.12].

In this article, we explore logging on to that other computer. Among other things, this access enables you to copy files from that remote computer to yours. I will also describe an IEEE service that lets you copy files from the IEEE computer. But first I want to make several points:

The IEEE's e-mail services are available to all members who wish to use them (and can use e-mail).

I am writing these articles as a userof a DOS based personal computer connected to a Unix-based workstation. If you have experience with other systems, I would appreciate any suggestions that I might include in these articles.

We can all benefit by sharing software (legally), so I invite any of you to tell me about software you have (or know where it's located) that you think we should put on the IEEE computer for everyone to share.

Finally, my apologies for an omission in the last article: the correct command string for uuencode is "uuencode filename fname | mail xxx.yyy".

REMOTE LOG-ONS.   There are two reasons to log on to a remote computer while you are logged on to the computer that handels your usual email account. One is to use the other computer for tasks that it can do better than your own computer can. (For example, the other computer may contain specialized hardware or software).

To do this, you need permission to log on, which means you must have obtained a logon name and password. To reach this remote computer, use the Unix command "telnet" followed by the Internet Protocol (IP) address for the remote computer. The IP address is a set of numbers in four groups separated by dots (each group ranges from 0 to 255). The comand string is of the form "telnet 111.222.33.4".

The second reason to log on to a remote computer is to copy files that are available for this purpose. Such files are stored in what is called an anonymous ftp (file transfer protocol) directory. If such a directory exists on a particular computer, use the "ftp" command followed by the IP address for that computer. You will be prompted for your login name; respond with "anonymous". You will then be prompted for your password; respond with your full domain address.

Then you then will probably use the following four Unix commands:

  • "ls -l"     to list the files and subdirectories
  • "cd xxx"     to change to subdirectory "xxx"
  • "get yyy"     to copy the file "yyy" to your own computer
  • "quit"     to return to your own computer

Computers have both a name and an IP address. The name of the computer in most e-mail addresses; it's the part after the "@". When using telnet or ftp, the IP address always works, but sometimes the machine name can be used. This depends on the specific Unix operating system and how it has been set up. You can get the IP address by using the Unix command "nslookup" followed by the machine name. In the case of the IEEE computer, the command "nslookup ftp.ieee.org" will return the IP address "140.98.1.1"

FTP VS TELNET.   Realize that anyone can logon to an anonymous ftp directory on a computer using ftp, but not everyone can use telnet because that implies you have an account and a password. Only the IEEE staff who maintain the IEEE computer have such access, so do not ask for an account! But you can use ftp.

You are likely to use telnet in a work related environment where the your employer arranges and pays for the usage on both computers. You can use the ftp command to copy data or program files. Many anonymous ftp directories are not easy to explore. You need to figure out what file is where.

HOW TO FIND A FILE.   Here are a few tips to help. There may be an index. If the "ls -l" command shows a file called "index", copy it with the "get" command and look at it on your own computer. It is likely to be an index of files stored in the ftp directory. You need to be able to distinguish between directory names and file names. When using "ls -l" and looking at the entries, you will know the entry is a (sub)directory if the left most character on a line is a "d".

If the file name ends with ".Z", it has been compressed and you must use the "uncompress" command. If the file name ends with ".tar", it has been archived (that is, a set of files has been combined into a single file) and you must use the "tar" command to restore the original set. These two features are often combined.

To find out more about these and other Unix commands, use the on-line manual feature that is part of the Unix system. For example, use "man tar" to learn about the tar command. There's a lot of stuff out there. Good hunting! -- Robert T.H. Alden


Robert T.H. (Bob) Alden is the chair of the IEEE E-mail Committee, and a former IEEE vice president.   He welcomes your input via .

pre-IEEE website
by Bob Alden