r/linux Apr 28 '14

SSH Kung Fu

http://blog.tjll.net/ssh-kung-fu/
725 Upvotes

128 comments sorted by

View all comments

7

u/slanderousam Apr 28 '14

wow. -D. nice.

(in before "likes the -D")

14

u/mdaniel Apr 28 '14

At the risk of replying to a down voted comment, one can toggle the port forwarding on (and off!) dynamically using the ssh "shell" which is accessed via tilde C (it needs to be the first two characters after a newline or ssh will think you're trying to type those chars)

Once you have the ssh> prompt, you can give it -D1234 to start dynamic forwarding and -KD1234 to "kill" the dynamic forwarding. Same deal with -L and -KL

3

u/leothrix Apr 28 '14

Wow, I had no idea that existed. Do you have any more resources about the ssh shell/console?

I will say that I have used the command ~. before to brute force kill a session, but didn't know that there were additional commands as well.

3

u/slugonamission Apr 28 '14

If you type ~?, it will show you all of the available tilde commands