Never been to TextSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

« Newer Snippets
Older Snippets »
3 total  XML / RSS feed 

SSH dynamic forward (Linux)

This command will create a dynamic forward from an SSH client to an SSH server. Basically what this does is allow you to use any local port (8080 in this example) as a proxy for any TCP application.

Feedback, suggestions and comments are all welcome!

# In the following example, we create a dynamic
# forward from port 8080 (client) to port 22 (

ssh -D 8080

# Now, we'll check out netstat to see what we
# have done.


# Active Internet connections (w/o servers)
# ...
# ...
# Awesome! Now we've got the connection. I'll add
# another post telling how to use this port as a
# socks proxy for any TCP application :)

ssh tunnel for mysql

// description of your code here

No forking in background and verbose

ssh -2 -v -c blowfish -C -N -L 3370/

Forking in background

ssh -2 -f -c blowfish -C -N -L 3370/

SSH tunnel for mySQL

Connect to remote mysql server via ssh tunnel:

ssh -f -L 3306: sleep 120

Should auto-disconnect when it’s no longer in use.
« Newer Snippets
Older Snippets »
3 total  XML / RSS feed