User Tools

Site Tools


add-socks5-proxy-to-sshconfig

Add socks5 proxy to .ssh/config

$ cat .ssh/config
Host    ssh-proxy
    Hostname ssh-proxy.domain.net
    DynamicForward 9999
 
Host    ssh-host-with-proxy
    Hostname host.domain.com
    ProxyCommand nc -x localhost:9999 %h %p
 
$ ssh ssh-proxy
[ ... ]
<new terminal>
$ ssh ssh-host-with-proxy
[ ... ]
 
# Alternative with SSH in Background
$ ssh -f -N ssh-proxy
[ ... ]
<same terminal>
$ ssh ssh-host-with-proxy
[ ... ]
add-socks5-proxy-to-sshconfig.txt · Last modified: 2023/09/03 10:13 by baumi

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki