Skip to content

Instantly share code, notes, and snippets.

@manhdaovan
Created March 29, 2018 03:56
Show Gist options
  • Save manhdaovan/71e158ed9cf9a6919ddfbf8b5df1cae7 to your computer and use it in GitHub Desktop.
Save manhdaovan/71e158ed9cf9a6919ddfbf8b5df1cae7 to your computer and use it in GitHub Desktop.
scp via proxy
# Download file from target server via proxy server using scp command
# Usage: scp_download_file /path/to/file/in/target/server
function scp_download_file(){
scp -o "ProxyCommand ssh user@proxy_server_domain_or_ip -W %h:%p" user@target_server_domain_or_ip:$1 ~/Downloads/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment