10 examples for scp
# Downloads a file from a remote location scp user@remote_host:path/to/source path/to/destination
# Transfer local copy to remote destination: scp localfile remotehost:/path/to/destination
# Transfer folder and its content to remote computeR scp -r folder/ user@host:/path/to/destination
# Download a file from a remote location with port specified scp -P port-number user@remote_host:path/to/source path/to/destination
Tool used to transfer files over the network. Send a file to another machine: scp file_to_transfer.txt machine_name_or_ip:/path/to/destination Transfer a file to current machine: scp machine_name_or_ip:/path/to/source /path/to/destination # your_comment_here
# copy multiple files from remote to current local directory: scp user@example.com:"file1 file2 file3" .
# to send a file whose name includes a colon (:) to a remote host, use ./ before filename scp ./some_file_includes_colon_:in_it user@remote:/dir # or use absolute path scp /absolute/path/some_file_includes_colon_:_in_it user@remote:/dir
# SCP from a remote host to your localhost with compression scp -C user@remotehost:/path/to/file /path/to/file
# From server B initiate and transmit file(s) from server A to server C through server B. scp -3 user@serverA:/tmp/foo.txt user@serverC:/tmp/
# Uploads a local file to a remote host scp user@remote_host:/path/to/destination local_file