Wednesday, 31 July 2013

SSH - add port forward to current session

How many times have you had an active SSH session then realise that you have forgotten to forward a port that you now need? Heaps I'm sure. Well this little nugget of information will save you opening another session just for a port forward.

From the current open session at the command prompt just type ~C (that is tilda followed by capital c, on a US keyboard its the key to the left of 1)
This will bring up the ssh> prompt where you can type in you new port forwarding command. You do this just as you would when creating the port forward in the first place, eg. -L 8080:localhost:8080 to forward everything on port 8080 to your ssh server. 

No comments:

Post a comment