OpenSSH ProxyUseFdpass

Posted on

Tags: OpenSSH

Few minutes ago, while RTFMing ssh_config(5), I came across following option:

 ProxyUseFdpass
         Specifies that ProxyCommand will pass a connected file descriptor
         back to ssh(1) instead of continuing to execute and pass data.
         The default is no.

Now, I can connect to SSH over proxy, without leaving an nc running for the duration of ssh session:

ssh -o ProxyUseFdPass=yes -o ProxyCommand='nc -F -X 5 -x 127.0.0.1:8080 %h %p' -l user server

Fancy!