- Copy a local file to a remote host:scp [path/to/local_file] [remote_host]:[path/to/remote_file]- Copy a file from a remote host to a local folder:scp [remote_host]:[path/to/remote_file] [path/to/local_dir]- Recursively copy the contents of a directory from a remote host to a local directory:scp -r [remote_host]:[path/to/remote_dir] [path/to/local_dir]- Copy a file between two remote hosts transferring through the local host:scp -3 [host1]:[path/to/remote_file] [host2]:[path/to/remote_dir]- Use a specific username when connecting to the remote host:scp [path/to/local_file] [remote_username]@[remote_host]:[path/to/remote_dir]- Use a specific ssh private key for authentication with the remote host:scp -i [~/.ssh/private_key] [local_file] [remote_host]:[/path/remote_file]
scp -words [-12346BCpqrv ] [-c cipher ] [-F ssh_config ] [-i identity_file ] [-l limit ] [-o ssh_option ] [-P port ] [-S program ] [[user @ ] host1 file1 ] ... [[user @ ] host2 file2 ]
scp copies files between hosts on a network. It uses ssh(1) for data transfer, and uses the same authentication and provides the same security as ssh(1). scp will ask for passwords or passphrases if they are needed for authentication.
File names may contain a user and host specification to indicate that the file is to be copied to/from that host. Local file names can be made explicit using absolute or relative pathnames to avoid scp treating file names containing `:' as host specifiers. Copies between two remote hosts are also permitted.
The options are as follows:
Ex -std scp
sftp(1), ssh(1), ssh-add1, ssh-agent1, ssh-keygen1, ssh_config5, sshd(8)
scp is based on the rcp program in BSD source code from the Regents of the University of California.
An Timo Rinne Aq Mt firstname.lastname@example.org An Tatu Ylonen Aq Mt email@example.com