Windows: Telnet & FTP

Terms You Need to Know

The following table is for your reference as you learn about telnet and FTP:
Term       Definition                                                              
Client     A program you use to request a resource or service from another         
           program called a "server."  For example, you may use a client to        
           request a file from a file server.  Generally, the client is located    
           on a different computer from the server, often on your own desktop.     
           See "Server."                                                           
Download   Simply put, to "get" a file from a server.  To be more specific, it     
           means to transfer files between two computers; usually, to transfer     
           files from a server on a larger computer to a client on a smaller       
           computer.  See "Upload."                                                
Host       A computer, connected to a network, that allows you to log in and use   
           resources.  For example, fog is a host computer you may use for your   
           email service.                                                          
IP Number  Internet Protocol number.  The unique number that identifies a          
           computer on the Internet.  You can use a computer's name or its IP      
           number when you specify its address.                                    
Server     A program that "serves up" resources and services you request using     
           your client program.  The server is usually located on a "host"         
           computer.  "Host" and "Server" are frequently used interchangeably.     
           See "Client."                                                           
Upload     Simply put, to "put" a file onto a server.  To be more specific, it     
           means to transfer files between two computers; usually, to transfer     
           files from a client on a smaller computer to a server on a larger       
           computer.  See "Download."                                              

We got help with these definitions from the Free On-line Dictionary of Computing at http://wombat.doc.ic.ac.uk/.

Just what are Telnet and FTP?

Telnet and FTP are protocols, a set of formal rules for transmitting data. You use these protocols to connect to servers on the Internet for two different purposes:

Telnet

Most people use telnet to connect to their email accounts. At CCSF, you may also use telnet to log on to hosts that provide public access, such as the library's public information server. To telnet to a host from a PC with a direct Internet connection, you can use the Telnet program that ships with Windows 95. If you are using a modem, you can only use the Win95 Telnet if you pay for a special PPP connection from an Internet Service Provider. If you do not have a PPP connection, you can telnet using Unix commands as discussed later in this document.

Making a Telnet Connection With Win95 Telnet

To see how Telnet works, try telnetting to the library server. Double-click on the program icon and the Telnet screen pops up. To open a connection, choose Remote System from the Connect menu.


In the Hostname field, type the name or IP number of the host you want to access. If your connection is successful, your host session begins.
To gain access to the host, you now provide a user ID or name, and, on many hosts, a password. If a host offers public access, this screen usually displays the required user ID and password (note that the password will not appear as you type it).

Moving Around and Exiting

The way you move from screen to screen in a telnet session varies from host to host. You often find this navigation information displayed at the bottom of the screen. Many hosts provide a menu structure that's easy to use, but some do require you to use Unix commands. If you're having difficulty in a session and can't find help on the screen, try typing help.

If you want to exit the session but can't find the command, try typing exit, logout, or quit. After you exit from one host session, you may want to telnet to another host using Telnet. Select Remote System from the Connect menu, and complete the login window again. When you've completed all your sessions, you can quit Telnet by selecting Exit from the File menu.

Making a Telnet Connection With the UNIX Command

Once you connect to a host, you can telnet to a different host using the Unix command "telnet". If you have a direct Internet connection, it's preferable to use Telnet instead to conserve Internet resources. If you're using a modem, however, you'll want to use Unix to telnet to "foreign" hosts. First connect to the campus server with a program such as Hyperterminal or MS-Kermit. From the menu, choose the item you wish to connect to. Once you are logged in to a CCSF service such as fog, at the Unix prompt type telnet hostname.

Telnet's Limitation

You can get access to a great deal of information and services through telnet, but you cannot transfer files. To transfer files, use the File Transfer Protocol (FTP), which is discussed next.

FTP

You can use FTP to transfer files between: Anonymous FTP servers allow you to log on and transfer files, even though you don't have an account on the servers. Let's look at some reasons you might use FTP.

If you have an account on a server on campus, you can use FTP to upload files from your PC to your account. You can then email the file, or, if it is an html file, you can make it accessible on the World Wide Web. Downloading files through anonymous FTP is a good way to get free software and other types of files or to save a file someone has sent you. (Note: before you run any software or open any files you download, be sure to check it for viruses.) Some servers also allow the public to upload files to selected directories--which is why you need to be careful about viruses when you download programs.

Two Kinds of FTP

For FTP in Windows, you can use WS_FTP or Unix FTP. WS_FTP is a microcomputer FTP client that you'll put on your PC's hard drive; you can get it by going to CCSF FTP site at ftp://ftp.ccsf.org/pub/TCP/. Although it can only be used with a direct ("hard-wired") connection (i.e., not with a modem connection), WS_FTP has distinct advantages over Unix FTP, the primary one being that you can upload and download files directly to and from your PC. Unix FTP is a mainframe client, which means that you can connect via modem to your mainframe account and use FTP to upload and download from it. To repeat, when you use Unix FTP, you are uploading and downloading to and from your mainframe account, not your PC, as you are using WS_FTP. Both kinds of FTP are discussed below.

Note to modem users: If you use an Internet service provider, establish your Internet connection before starting WS_FTP. If you are using a modem without PPP, you cannot use WS_FTP. Refer to Using Hyperterminal for help transferring files.

Using WS_FTP

When you start WS_FTP, the Session Profile window appears. Before filling in this window, make sure the Anonymous Login field is not checked; otherwise your password displays when you type it. Type fog.ccsf.cc.ca.us in the Host Name field and your user id and password in the appropriate fields. Click OK, and cross your fingers while WS_FTP establishes a connection to the server.

Once you connect, the Session Profile window disappears and the program window displays. The left half of the window shows the files and folders on your local computer. The right side shows the files and folders on your fog account. Beside each list are buttons for the file system. To open a folder, double-click on it; to move back up a folder level, scroll to the top of the file list and double-click on the green arrow. To change to a different drive on your local computer system, click on the ChgDir button next to that file list, and type the drive letter followed by a colon; for example, to switch to a floppy disk, click ChgDir and type A:.

Transferring Files

To upload files, find the files on your local computer that you want to move to the server; on the remote server, open the folder you want to put files in. To download files, find the files on the server and the directory you want to put them in on your hard drive. To move a file from one system to the other, click on it, and then click on the arrow that points in the direction you want to move it. The following are other options you may find helpful:

File Names in UNIX

In Windows 3.1 and DOS, you are limited to an 8 character file name with a 3 character extension. In Windows 95, you can use long filenames, including spaces. In Unix, you can use long filenames with more than a 3 char extension, but you cannot put spaces in file names. Furthermore, Unix is case-sensitive, so you might want to avoid confusion by using all lower-case letters consistently.

To address problems with filenames, you have a couple options. Click on the Options button and then choose Session Options. You can choose to Force Lowercase (Win95 tends to give filenames an initial capital while DOS uses all capitals); you can also Prompt for Destination Filenames so that you rename files manually when you upload or download them.

Making Files Usable

If you download software, chances are the file is compressed somehow. Depending on the compression format, you can simply run the compressed file as you would any other program (double-click on it or use the Run menu option), or you may need a separate software program to uncompress the file. You can get a copy of PKUNZIP from the Technical Assistance Center.

File Permissions: Who Can Change Your Files? Who Can View Them?

You can grant yourself and others permission to do three basic things to your files on the Web server: read, write (make changes), or execute (run a program or open a folder). The question you should be asking is: who has permission to do what to your files? When you upload a file to fog, it automatically assigns these permissions to the file: This set up works just fine in many circumstances. If you are working on a group page, however, you will no doubt need to change your file permissions so that other people in your group can edit the file, too. To change the file permissions, connect to the server with WS_FTP. Right-click on a file and choose Chmod. Check off the options that you want, and OK your changes.

Ending or Changing a Server Connection

To disconnect from the Web server, click Close at the bottom of the window. Click Connect to make a new connection.

Customizing WS_FTP

Session Profiles
Session profiles allow you to save information such as host name, userID, etc. To create a session profile, at the Session Profile (logon) screen, click on New. Then enter a profile name, host name, and userID (not the password). You also enter initial directories for both the local PC and the remote host. When you are done, click on Save. To use a profile, choose its name from the Profile Name drop down box.
Other Options
You can select other options once you have at the connection screen. Click on the Options button. Program Options will allow you to specify if you want to Show Full Directory Information, Verify Deletions, or if you want double-clicking to Transfer a file, View the file, or do Nothing.

FTP Using UNIX Commands

You may want to use Unix commands to transfer files if, for instance, you're using a modem. The following table lists some commands you'll use:
Command        Description                                                         
ftp            Opens an FTP session at the server you specify.                     
ftpservername                                                                      
binary         Sets the file transfer type to binary.  Critical to the             
               successful transfer of files such as Word documents, graphics, or   
               software packages; also works fine with text files (files that      
               contain only ascii text and no formatting).                         
get filename   Transfers the file you specify to your account on the campus        
               server.                                                             
mget file1     Transfers multiple files you specify to your account on the         
file2          campus server.                                                      
ls             Lists all the files in your current sub-directory.                  
cd             Changes the directory.  To move back up to a previous level, use    
subdirectory   "cd .." (note the space).                                           
put filename   Transfers a file from your account on a server to a directory on    
               another server.                                                     
mput file1     Transfers multiple files from your account on a server to a         
file2          directory on another server.                                        
pwd            Tells you the present working directory.                            
<Ctrl>+h       Deletes a character to the left of the cursor (acts as a            
               backspace).  Note:  use the Ctrl key; don't type the word "Ctrl".   
help command   Displays the definition of a command.  Type "help" to see a full    
               list of valid commands.                                             
bye            Ends the FTP session.                                               

Steps for Downloading

Here are the steps for downloading a file using Unix commands:
  1. Connect to your campus server.
  2. At the Unix prompt, type ftp ftpservername. For example, type ftp ftp.uwtc.washington.edu. Note: often "ftp" will be the first level of the server name (as it is in this example) in addition to the command you use to establish an ftp connection; be sure that you do not omit it in either case.
  3. Log on to the FTP server.
    • If you don't have an account on the server, log on as anonymous. Use your email address as the password.
    • If you have an account on the server, log on with your ID and password.
    If the server is available, the ftp prompt appears.
  4. Find the file you want. Refer to the previous table for commands you'll need. To continue our example:
    • To see the name of the current directory, type pwd.
    • To change to the Netscape directory, type cd /pub/Windows/WWW.
    • To see the files listed in that directory, type ls.
  5. Type binary to set the file transfer type.
  6. Type get filename. The file is transferred to your account on the campus server. To get the file in our example, we type get n32311b1.exe.
  7. To move the file from the campus server to your computer, use WS_FTP or, if you're on a modem, use zModem or Kermit.

Uploading

Uploading files is a similar procedure. To upload a file, telnet to the campus server from which you want to transfer a file to another server. Note the name of the file you want to transfer. FTP to the target server and log on. Find the directory to which you want to transfer the file. At the FTP prompt, type put filename. The file is transferred.

FTP on the World Wide Web

You can also transfer files on the World Wide Web using FTP. Details of the FTP session vary with the browser you use, but generally, you simply point and click to select a file to download. Of course, the file must be available at an FTP server (such as CCSF FTP server at ftp://ftp.ccsf.org/pub/) for you to be able to download it.
___________________________________CCSF___________________________________

[Web Weaver] [CCSFweb] [CCSF Info] [Events] [Site Index] [Help]