10 examples for scp

{{ score }}
  # Downloads a file from a remote location
scp user@remote_host:path/to/source path/to/destination
{{ score }}
  # Transfer local copy to remote destination:
scp localfile remotehost:/path/to/destination
{{ score }}
  # Transfer folder and its content to remote computeR

scp -r folder/ user@host:/path/to/destination
{{ score }}
  # Download a file from a remote location with port specified
scp -P port-number user@remote_host:path/to/source path/to/destination
{{ score }}
  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
{{ score }}
  # copy multiple files from remote to current local directory:
scp user@example.com:"file1 file2 file3" .
{{ score }}
  # 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
{{ score }}
  # SCP from a remote host to your localhost with compression
scp -C user@remotehost:/path/to/file /path/to/file
{{ score }}
  # 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/
{{ score }}
  # Uploads a local file to a remote host 
scp user@remote_host:/path/to/destination local_file