There are a couple of very interesting things about SSH that I never knew before – and I think you’ll find them interesting as well. Over at nixshell, there was a pointer to an article (by Nico Golde) about creating port forwarding allocations on the fly over an existing connection.
To do this (from an existing networked SSH session), use the
~ escape character like so:
The results can look like this:
$ ssh> -h Commands: -L[bind_address:]port:host:hostport Request local forward -R[bind_address:]port:host:hostport Request remote forward -KR[bind_address:]port Cancel remote forward $
In this case, I entered
~C then the “command”
-h for help. To enter a command at this prompt, it is necessary to press
~C each time; after the help screen came out I pressed the enter key and you see the UNIX prompt returned.
However, there is a lot more. Going further in nion’s blog (the source), there is also a post about using the
ControlPath options to reuse an existing SSH connection for much faster connections. This sounds exciting and is something I’ll have to investigate myself. Expect to see more on this later.