Check out my first novel, midnight's simulacra!

OpenSSH

From dankwiki
Revision as of 04:30, 15 January 2010 by Dank (talk | contribs)

OpenSSH is a powerful, open-source implementation of the Secure Shell protocol.

Connection multiplexing

OpenSSH 4.0 added connection multiplexing, which can tremendously accelerate ssh connection setup. I discern no weaker security here than that accepted when forwarding an agent -- root on the target machine can take advantage of the control named pipe created, unless the "ask"/"autoask" properties are used (and even then, they could be snooping memory...). There's some serious speed wins to be had:

[recombinator](127) $ \time -f %E ssh -oControlPath=none hogwarts true 
0:01.44
[recombinator](0) $ \time -f %E ssh -oControlPath=none hogwarts true 
0:01.65
[recombinator](0) $ \time -f %E ssh -oControlPath=none hogwarts true 
0:01.68
[recombinator](0) $ \time -f %E ssh -oControlPath=none hogwarts true 
0:01.61
[recombinator](0) $ \time -f %E ssh hogwarts true
0:00.26
[recombinator](0) $ \time -f %E ssh hogwarts true
0:00.20
[recombinator](0) $ \time -f %E ssh hogwarts true
0:00.20
[recombinator](0) $ \time -f %E ssh hogwarts true
0:00.22
[recombinator](0) $ 

Just set ControlPath to something like ~/.tmp/ssh/%r-%l-%h-%p (make sure the directory exists!), and ControlMaster to auto or autoask. Display and agent forwardings will be available to all multiplexed connections, but (at least as of 5.2) it is impossible to forward multiple displays or agents.

External Links