scp [-p] [-v] [-r] [[user@]host:]file ... [[user@]host:]file_or_dir
Copies files over the network securely; uses ssh for data transfer, using the same authentication and providing the same security as ssh.
ucsu> scp mydata.dat parter:mydata.dat
copies file ``mydata.dat'' from the ucsu (current directory) to your home directory on parter
ucsu> scp parter:mydata.dat ./mydata.dat
copies file ``mydata.dat'' from the your home directory on parter to your current working directory on ucsu
ucsu> scp smithj@euclid.ucla.edu:research/09/mydata.dat ./mydata.dat
copies file ``mydata.dat'' from the ~/research/09/ subdirectory of your home directory on euclid.ucla.edu (where your username is ``smithj'') to your current directory on ucsu
ucsu> scp -r research parter:MyRsrch/09
copy directory ``research'' recursively (i.e., the directory and all its contents) from ucsu into a new directory ``MyRsrch/09'' in your home directory on parter (the directory ``MyRsrch'' must already exist)
ucsu> scp -r smithj@euclid.ucla.edu:MyRsrch/09 ./r9
copy directory ``MyRsrch/09/'' recursively (i.e., the directory and all its contents) from euclid.ucla.edu (where you are "smithj" into a new directory ``r9/'' in your current working directory on ucsu
-r This option specifies that scp2 should copy directories recursively -- copies all the files & subdirectories, plus the contents of the subdirectories themselves, etc. The operation does not follow symbolic links.
-p Tells scp to preserve file attributes and timestamps.
SSH2 Last change: March 22, 2000 NAME scp - secure copy client SYNOPSIS scp [-D debug_level_spec] [-d ] [-p ] [-n ] [-u ] [-v ] [-h ] [-c cipher ] [-S ssh2-path] [-P ssh2-port] [-t ] [-f ] [-1 ] [-r ] [-B ] [[user@]host[#port]:]file ... [[user@]host[#port]:]file_or_dir DESCRIPTION Scp (Secure Copy) is used to copy files over the network securely. It uses ssh2 for data transfer, and uses the same authentication and provides the same security as ssh. Unlike rcp, scp will ask for passwords or passphrases if they are needed for authentication. Any filename may contain a host, user and port specification to indicate that the file is to be copied to/from that host. Copies between two remote hosts are permitted. ``file'' can contain globbing patterns. Read more about those from sshre- gex(1). OPTIONS -D debug_level_spec Print extensive debug information to stderr. debug_level_spec is a number, from 0 to 99, where 99 specifies that all debug information should be displayed. -d With this option, scp will make sure that the destina- tion file is a directory. If not, scp will exit with an error message. -p Tells scp to preserve file attributes and timestamps. -n Makes scp show what operations would've been done, without actually copying any files. -u Makes scp remove source files after copying. -v Makes scp verbose. This is equal to specifying the`-D 2'-option. -h Display a short help. -c cipher Select the encryption algorithm that ssh will use. Multiple -c options are allowed and a single -c flag can have only one cipher. -S ssh2-path Specifies the path to ssh used in connecting. -P ssh2-port Specifies the remote port to ssh . Ports can also be defined on file-to-file basis. See SYNOPSIS . -t or -f These options are reserved for scp1 compatibility mode. If they are used with scp, it gives them as arguments to scp1 to handle the connection. -1 This option invokes scp1 with given arguments. The ``- 1'' is removed from the list, however, because scp1 doesn't understand this option. Because of this, this option has to be given as the first argument to scp and separated from other arguments. -r This option specifies that scp should copy directories recursively. The operation does not follow symbolic links. -B With this option, scp invokes, if need be, ssh with "BatchMode yes". INSTALLATION Scp uses ssh in network connections. Therefore it is not installed suid-root. Notice that subsystem `sftp-server' must be defined in sshd2(8)'s configuration file in the remote end for scp to work. AUTHORS SSH Communications Security Ltd For more information, see http://www.ssh.fi. SEE ALSO ssh(1), sshd2(8), ssh-keygen2(1), ssh-agent2(1), ssh- add2(1), sftp(1) rlogin(1), rsh(1), telnet(1)