↑ ↓ select, Enter open, Esc close

Set up a SOCKS proxy over an SSH connection

Adjust the values, the command updates live
user@server
ssh -N -D 1080 webuser@server.example.com

Starts a SOCKS5 proxy on 127.0.0.1:1080 on your own machine whose traffic goes out through the server. Handy for testing an IP allowlist, reaching an IP-restricted admin panel or opening internal addresses in the server network. Configure it as a proxy in the browser or use curl --socks5-hostname 127.0.0.1:1080.

Also searched as

  • ssh socks5 proxy
  • ssh -D dynamic port forwarding
  • browse through server ip with ssh

Related one-liners

All in SSH

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.