Friday, June 24, 2011

Calling a script via ProxyCommand in OpenSSH

Apparently when calling a script with ProxyCommand, it is important to redirect the output of the proxy command to /dev/null. Does anyone know the reason for this requirement?

ProxyCommand tunnel.sh %h %p 2> /dev/null

The tunnel script runs the following command which I will discuss in a future post.

ssh -l root -o "ProxyCommand connect -S $proxy_server:$socks_proxy_port $gateway 22" $gateway $remote_netcat $remote_hostname 22

No comments: