-->
Previous | Table of Contents | Next |
Here, an FTP session is initiated with ftp.uu.net, which is a major FTP archive site on the Internet. The username given at the login prompt is anonymous because this is anonymous FTP. For the password, the full e-mail address is used. ftp.uu.net then displays a welcome banner that gives some information about the archive. In this example, you can see that the user changes directories, sets the file mode to binary, gets a compressed binary file, and exits.
TROUBLESHOOTING:
I transferred a binary file, but it doesnt work properly. I cant unzip it, untar it, uncompress it, or anything. What should I do? Make sure that you set the transfer mode to binary. You can do this with the binary command at the ftp> prompt.Im in the process of transferring a large file and want to check the progress. Use the hash command. ftp prints the # character on-screen after every data buffer thats processed. The data buffer may vary depending on your version of Linux, but its typically 1,024, 4,096, or 8,192 bytes.
I was trying to do an anonymous FTP, but the site told me that the user anonymous was unknown and that the login failed. Either you misspelled anonymous, or the site doesnt allow anonymous FTP. In the latter case, you must have a valid username and password on the remote computer.
I want to transfer several files, but I dont want FTP to prompt me for each one. Use the prompt command, which toggles prompting on and off.
I tried to use anonymous FTP, but the site told me that I didnt enter a valid e-mail address as the password. In the past, the convention during an anonymous FTP connection was to enter guest as the password. Now, the convention is to enter your e-mail address. Many FTP sites run special FTP server software that checks the password and makes sure that its in the form [email protected]. Try again and make sure that you enter your full e-mail address correctly.
In addition to ftp and telnet, several other commands allow you to access remote computers and exchange files over a network. These commands are known collectively as the r- commands.
The r- commands deserve special notice because one of their features can cause a severe security loophole if you arent careful. When you issue an r- command, the remote system checks a file named /etc/hosts.equiv to see whether your local host is listed. If it doesnt find your local host, it checks for a file named .rhosts in your home directory on the remote machine. The r- command then checks to see whether your local host name is in the .rhosts file. If your local host is listed in either place, the command is executed without checking for a password.
Although it can be very convenient not to type your password every time you need to access a remote computer, it can obviously cause severe security problems. Its recommended that you carefully consider the security implications of the r- commands before setting up /etc/hosts.equiv and .rhosts files on your local system.
The rlogin command is very similar to the telnet command because it allows you to start an interactive command session on a remote system. The syntax of rlogin is as follows:
rlogin [-8EKLdx] [-e char] [-k realm] [-l user-name] hostname
However, the most common usage is simply this:
rlogin hostname
Table 30.3 explains the various options for rlogin.
Option | Description |
---|---|
-8 | Allows an 8-bit input data path at all times, which allows for formatted ANSI characters and other special codes to be sent. If this option isnt used, parity bits are stripped except when the remote stop and start characters are other than <Ctrl-s> and <Ctrl-q>. |
-E | Stops any character from being recognized as an escape character. When used with the -8 option, this provides a completely transparent connection. |
-K | Turns off all Kerberos authentication. Its used only when connecting to a host that uses the Kerberos authentication protocol. |
-L | Allows the rlogin session to be run in litout mode. Refer to the tty man page for more information. |
-d | Turns on socket debugging on the TCP sockets used for communication with the remote host. Refer to the setsockopt man page for more information. |
-e | Used to set the escape character for the rlogin session. The escape character is ~ by default. You can specify a literal character or an octal value in the form \nnn. |
-k | Requests rlogin to obtain Kerberos tickets for the remote host in the specified realm instead of the remote hosts realm as determined by krb_realmofhost(3). |
-l | Allows the remote name to be specified. If available, Kerberos authentication is used. |
-x | Turns on DES encryption for all data passed via the rlogin session. This can affect response time and CPU usage, but provides increased security. |
Previous | Table of Contents | Next |