In a tightly configured network policy environment, where every single connection must go through a proxy, a simple task such as file transfer would be a hassle.
A simple scp
connection also would be denied if it is not through a proxy.
However it still can be achieve with following additional internal paramater.
scp -o "ProxyCommand=nc --proxy <proxyHost>:<proxyPort> --proxy-type http %h %p" root@<remoteHost>:<remotePort>
Explanation
-o "ProxyCommand=nc --proxy <proxyHost>:<proxyPort> --proxy-type http %h %p"
- Supply an option, where will be proxy-ing via
nc
withProxyCommand=nc
- Define the proxy host and port with
--proxy <proxyHost>:<proxyPort>
. - Define the type of proxy as http with
--proxy-type http %h %p