Scp copies files between hosts on a network. It uses ssh
for data transfer, and uses the same authentication and pro-
vides the same security as ssh. The usage is more or less like
cp with the inclusion of remote hostname in one of the
arguments. Suppose you want to copy a file remote_file in directory remote_dir from the
stat175 server to a file named new_file
your current unix directory. The command will be
lightning:~ > scp username@stat175:remote_dir/remote_file new_file
It will promt for the password of the username in the stat175 server. Once
you input the password the file transfer begins. If you want to keep the
filename same you my type
lightning:~ > scp username@stat175:remote_dir/remote_file .
You can use wild cards such as
lightning:~ > scp username@stat175:remote_dir/*.ps .
Which will copy all the files with extension '.ps'
Notice that scp van also be used to transfer file from the host server to a
remote server in the same way by swaping the arguments e.g.
lightning:~ > scp new_file username@stat175:remote_dir/remote_file