Specifications

C
Network Security
Following successful authentication, work from the command line
there or use interactive applications. If the local user name is different
from the remote user name, log in using a different login name with
ssh -l augustine sun or ssh augustine@sun.
Furthermore, ssh offers the option of running commands on another system,
as does rsh. In the following example, we will run the command uptime on
the host sun and create a directory with the name tmp. The program output
will be displayed on the local terminal of the host earth.
newbie@earth:~ > ssh sun"uptime; mkdir tmp"
newbie@sun’s password:
1:21pm up 2:17, 9 users, load average: 0.15, 0.04, 0.02
Quotation marks are necessary here to send both instructions with one com-
mand. It is only by doing this that the second command is likewise executed
on sun.
scp Secure Copy
scp copies files to a remote machine. It is the secure and encoded substitute
for rcp. For example, scp MyLetter.tex sun: copies the file MyLetter.
tex from the machine earth to the machine sun. To give a different user
name, use the username@machine format.
After the correct password is entered, scp starts the data transfer and shows
a series of stars, gradually marking the progress from left to right. In addi-
tion, the estimated time of arrival will be shown in the right margin. All out-
put can be suppressed by giving the option -q.
scp also provides a recursive copying feature for entire directories.
scp -r src/ sun:backup/ copies the entire contents of the directory
src/ including all subdirectories to the machine sun in the subdirectory
backup/. If this subdirectory does not exist yet, it will be created automati-
cally.
Via the option -p, scp leaves the time stamp of the files unchanged. -C com-
presses the data transfer. This minimizes the data volume to be transferred,
but creates heavier burden on the processor.
sftp Secure File Transfer
Instead of scp, sftp can be used for secure file transfer. During the session,
sftp provides many of the commands used by ftp. This may be an advan-
tage over scp, especially when transferring data for which the file names are
unknown.
191SuSE Linux Firewall on CD2