https://bugzilla.mindrot.org/show_bug.cgi?id=1473
Tom Anderson <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #5 from Tom Anderson <[email protected]> 2009-12-23 06:48:06 EST --- @Damien: The ControlMaster feature is very cool, but you can't (currently) port-forward with the slaves, so if you're trying to set up multiple port forwardings, it doesn't help. @Darren: Things along this line (including ssh ... & ; echo $!) work in many cases, but crucially, don't work with -f. -f is particularly useful because ssh remains in the foreground until it has completed authentication, so in a script, you can rely on a connection having been made once it returns. What i'd like to be able to do is to write scripts like: echo "Starting port forwarding of A" <SOME SSH COMMAND> echo "Starting port forwarding of B" <SOME SSH COMMAND> echo "Doing lots of things using forwarded port ..." <SOME COMMAND TO CLOSE ALL CONNECTIONS> Whether this is using pid/kill or the ControlMaster mechanism. I think i have an idea - mktemp a directory, then start several independent control master connections, one for each forwarded port, with control paths mktemp'd (or otherwise) in that directory, running with -f. To shut them down, for-loop over the files in the directory and do -O exit to close the connections. It's anything but pretty, but it should work (a classic shell script, then!). -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. You are watching someone on the CC list of the bug. _______________________________________________ openssh-bugs mailing list [email protected] https://lists.mindrot.org/mailman/listinfo/openssh-bugs
