Created
March 29, 2018 03:56
-
-
Save manhdaovan/71e158ed9cf9a6919ddfbf8b5df1cae7 to your computer and use it in GitHub Desktop.
scp via proxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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