UNIX
3.0 Remote Logins and FTP
3.1 Remote Logins
To log into a remote system, use rlogin if your login name is the
same on both systems, and use telnet when the login names differ,
or when the remote system does not require a login name to be used.
Two examples will illustrate rlogin and telnet. If you
are logged into mari and wish to log into lars, type rlogin
condor.wesleyan.edu. You can use the rlogin command because
your login name is the same on all Wesleyan machines. If you wish to use
the electronic library catalog system LUMINA at the University of Minnesota,
you should type telnet lumina.lib.umn.edu and press RETURN. Since
this account is designed to be used by guests, no login name or password
is required.
The rsh command is used to execute commands on remote computer
systems. Users must specify, for each system on which they have an account,
a list of all other systems from which they may call the system with the
rsh command. This list must be placed in a file named .rhosts
in the user's home directory on the given system. For example, let us say
that a user has accounts on these machines:
condor.wesleyan.edu
umn-cs.cs.umn.edu
If the user is logged into condor and wants to execute an rsh command
on umn-cs, the user must have the line condor.wesleyan.edu
in the file .rhosts in the home directory of the user's account
on the machine umn-cs.cs.umn.edu.
3.2 FTP
File transfer protocol, or ftp, is the standard command used to
transfer files from one computer system to another. By typing ftp systemName,
users connect with the remote system systemName, on which
they are given a limited number of commands. Many systems (including many
that do not provide for guest logins) allow anonymous ftp. After
connecting to the remote system with ftp, users who do not have
accounts on those machines may type anonymous or ftp in
response to the login: prompt and, as a convention, type their
email address in response to the password: prompt.
The ftp commands that are available for use on almost all remote
systems are bin, asc, ls, dir (which
is equal in function to ls -l) cd, put and get.
The first two commands determine the type of data that will be transferred.
In general, binary mode should be set before most transfers by typing bin
and pressing RETURN. The second mode, ascii (set by typing asc
and pressing RETURN) is only appropriate when transferring text files (especially
if the results of a binary transfer appear garbled).
The third command (ls) is similar to the UNIX command, although
flags may not be allowed. Using dir will give all the information
gotten from ls -l. The fourth (cd) lets the user change
directories on the remote machine (useful in finding the file to be transferred
or in determining where a transferred file will be placed--although full
pathnames will always work).
The last two commands, put and get, transfer files from
one system to the other. They are called by typing put filename
and get filename, where filename is one
of the files in the current directory on the user's system (for put),
or in the current directory on the remote system (for get). For
more details on ftp, type man ftp and press RETURN.