10.4 gFTP FTP Client


10.4 gFTP FTP Client

You can use your web browser to download files from an FTP server, but to upload files you need an FTP client. The gFTP client, included with Red Hat Enterprise Linux and Fedora Core, is an excellent choice, because its user interface resembles that of popular Windows FTP clients, such as WS-FTP. Figure 10-18 shows the gFTP client, which can be launched by choosing Internet images/ent/U2192.GIF border=0> More Internet Applications images/ent/U2192.GIF border=0> gFTP from the main menu.

Figure 10-18. The gFTP FTP client
figs/rh4_1019.gif

To connect to a remote system, specify the hostname, username, and password in the textboxes appearing on the toolbar. If the server permits anonymous logins, you can omit the username and password. To connect, click the Connect icon resembling a pair of computers at the left of gFTP's toolbar. To upload a file, click on the name of the file in the local list box at the left of the window and then click on the right-pointing arrow. To download a file, click on the name of the file in the list box at the right of the window and then click on the left-pointing arrow. When you've transferred all your files, choose Remote images/ent/U2192.GIF border=0> Disconnect or click again on the Connect icon.

You can access an FTP server in command-line mode, if you prefer. Chapter 12 explains how to do so.



10.5 Using wvdial

If you have your dial-up network connection working perfectly, you may have little interest in exploring wvdial. However, there are two reasons you should consider learning more about wvdial: you can use wvdial even if X isn't working or isn't installed, and you can use wvdial in shell scripts of your own design. Chapter 13 includes an example script.

10.5.1 The /etc/wvdial.conf File

To configure wvdial, become the root user and issue the following command:

# wvdialconf /etc/wvdial.conf

This command analyzes your system and creates a template configuration file, /etc/wvdial.conf. You must edit this file to specify the username and password your ISP expects.

The contents of the template file look something like this:

[Dialer Defaults]

Modem = /dev/modem

Baud = 115200

Init1 = ATZ

Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 S11=55 +FCLASS=0

ISDN = 0

; Phone = <Target Phone Number>

; Username = <Your Login Name>

; Password = <Your Password>

Edit the last three lines of the file, deleting the leading semicolon and space and substituting the proper phone number, username, and password required to connect to your ISP. When you're done, your file should look something like this:

[Dialer Defaults]

Modem = /dev/modem

Baud =  115200

Init1 = ATZ

Init2 = ATQ0 V1 E1 &C1 &D2 +FCLASS=0

ISDN = 0

Phone = 15625551100

Username = bill100

Password = donttell

Be sure that only the root user can read the wvdial.conf file. Use a file manager or the shell to change the file's permissions, if necessary. Otherwise, someone who uses your system may discover your password.


Now, you're ready to make a connection by issuing the following command:

# wvdial &

The command generates quite a bit of output, which makes further use of this virtual terminal distracting. The simplest solution is to switch to another terminal window, or to another virtual terminal by pressing Alt-n, where n stands for the virtual terminal (1-7). Alternatively, you can direct the output of the command to a file, by typing this command in place of the one given earlier:

# wvdial 2>/tmp/wvdial.messages &

Of course, you'll need to consult the file if something goes wrong with wvdial. Do so by using the less command:

# less /tmp/wvdial.messages

Once your connection is up, you can browse the Web and access other Internet services. For now, simply verify that your connection is working by issuing the command:

# ping www.redhat.com

The ping command should report that echo packets were successfully received from the server. If not, check your name server configuration and other details, as described earlier in the chapter.

When you want to terminate the Internet connection, issue the command:

# killall wvdial