Using ftpNow that we have learned about remote access to do work at the shell prompt, what about other forms of remote work such as remote file transfer? Many times you will be called on to send or receive files much like the ones you have made, or explored within Unix already. Remember the *.rpm packages? The tar files? All of these things can be sent to other Unix systems where other people can work with them or use them if needed. The ftp command provides you with a way to retrieve files from remote machines that aren't set up to share file systems with yours. If your machine is running an FTP server, you might be able to use it to provide your files to the rest of the world as well. Contact your system administrator about this. Remember, this book covers only the using end of Unix, so anything that needs to be added to your Unix system must be requested. To use the ftp command, simply enter the command as follows: ftp <ftp server>, where the FTP server is the IP address or hostname of a remote machine running an FTP server. If you've connected properly, you'll get a prompt for your credentials, which are your username and password. It should also be noted that FTP has the same inherent problems as telnet; the information is sent in clear text. Some FTP servers enable you to connect without an account on the system. For these, use the username anonymous and give your email address as the password. Let's see how to log in with ftp: > ftp 10.1.1.1 > ftp pr1 Once connected to an FTP site, you can cd and ls your way around. Using the command get <filename> enables you to retrieve a file, and put <filename> enables you to send one from your directory to the remote system.
|