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/.
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:
- To log on to an Internet server and look at information there, you use the telnet protocol. For example, you use telnet to log on to the library's server. You cannot download or upload files using telnet.
- To download or upload files between computers, you use the File Transfer Protocol (FTP).
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.
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).
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.
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.
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.
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.
- Your computer and a server on which you have an account
- Your accounts on two different servers
- Your computer (or account) and an "anonymous FTP" server
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.
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.
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:.
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:
- To create a new folder on either file system, click the MkDir (for make directory) button next to the appropriate system. Double-click on the new folder to open it and move files into it.
- To select several files grouped together, click on one file and then Shift-click on the last file in the group. To select several files not grouped together, click on one, and then Ctrl-Click on the others. To deselect a file in a group, Ctrl-click on it.
- To delete a file or folder, select it, and then click Delete.
- To rename a file or folder, select it, and then click Rename.
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.
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.
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.
- You (the owner of the file) can read and write to the file.
- Members of your group (which may be staff, faculty, graduate, or undergraduate or some other group) can read the file.
- Other people in the world can read the file.
To disconnect from the Web server, click Close at the bottom of the window. Click Connect to make a new connection.
Session ProfilesSession 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 OptionsYou 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.
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.
Here are the steps for downloading a file using Unix commands:
- Connect to your campus server.
- 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.
- Log on to the FTP server.
If the server is available, the ftp prompt appears.
- 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.
- 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.
- Type binary to set the file transfer type.
- 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.
- 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 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.
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.
[Web Weaver] [CCSFweb] [CCSF Info] [Events] [Site Index] [Help]