SSH Tunnel

Tunneling or tunneling is a very useful technique to bypass restrictions and create an encrypted channel for data traffic.


ssh -ND 8888 julio@host


  • -N: do not execute commands
  • -D: run a proxy server on the specified port
  • -f: run in the background
  • -C: enable compression


Edit » Preferences » Advanced » Settings… » Manual proxy configuration:

  • SOCKS Host: localhost
  • Port: 8888


$ chromium --proxy-server="socks5://localhost:8888" \
            --proxy-bypass-list=";;*" \
            --host-resolver-rules="MAP * ~NOTFOUND , EXCLUDE localhost"

Jump Server

Let’s say there is a database (PostgreSQL on port 5432) that is only accessible from the local network. If you have SSH access to a machine on that network, you can interact with the database as follows:

ssh -N -L$DB_HOST:5432 my_server
pg_dump --verbose --create --schema-only --no-owner -d nome_bd -h localhost -p 5434 -U usuario --password -f dump.sql
Julio Batista Silva
Julio Batista Silva
Data Engineer

I’m a computer engineer passionate about science, technology, photography, and languages. Currently working as a Data Engineer in Germany.

comments powered by Disqus