Skip to content

Instantly share code, notes, and snippets.

@cobanov
Created March 3, 2022 17:28
Show Gist options
  • Save cobanov/cb64d6875a55addf091765466f7df7c8 to your computer and use it in GitHub Desktop.
Save cobanov/cb64d6875a55addf091765466f7df7c8 to your computer and use it in GitHub Desktop.
# SCP
scp <options> source_path destination_path
scp file user@host:/path/to/file|# copying a file to the remote system using scp command
scp user@host:/path/to/file /local/path/to/file|# copying a file from the remote system using scp command
scp file1 file2 user@host:/path/to/directory|# copying multiple files using scp command
scp -r /path/to/directory user@host:/path/to/directory|# Copying an entire directory with scp command
# Options
-r|transfer directory
-v|see the transfer details
-C|copy files with compression
-l 800|limit bandwith with 800
-p|preserving the original attributes of the copied files
-P|connection port
-q|hidden the output
# Proxy Jump
scp -o "ProxyJump user@firsthost -p 40020" file seconduser@secondhost:/path/to/file|proxy jump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment