Mar 09, 2025
Terminal access via proxy
To access a terminal (SSH) using a proxy, you have several options depending on the type of proxy (HTTP, SOCKS5) and your setup. Here are some common methods:
Using OpenSSH with a Proxy
If you’re using an SSH client that supports proxies (like OpenSSH), you can configure it to route through a proxy.
A. SOCKS5 Proxy (e.g., Tor, Shadowsocks)
1 | ssh -o ProxyCommand="nc -x <proxy_host>:<proxy_port> %h %p" user@target_server |
Alternatively, if your system has proxychains installed:
1 | proxychains ssh user@target_server |
B. HTTP Proxy with nc (Netcat)
1 | ssh -o ProxyCommand="nc -X connect -x proxy_ip:proxy_port %h %p" user@target_server |
C. Using proxytunnel for an HTTP Proxy
Install proxytunnel first:
1 | sudo apt install proxytunnel |
Then, use:
1 | ssh -o ProxyCommand="proxytunnel -p proxy_ip:proxy_port -d target_server:22" user@target_server |
Other
Cheap VPS Recommendations Page: