Speeding up SSH (ControlMaster)Trackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
So this speeds up login multiple times?
What's the advantage over 'just' using passwordless key authentication?
yes speed since you dont have the tcp connect overhead every connection
Permissions: it should be enough to set ~/.ssh (or ~/.etc/ssh, on MirBSD) to 0700 ― MirBSD default is ~/.etc is 0700, so that matches; pristine OpenSSH refuses to work if ~/.ssh is not 0700, so that also matches.
ControlMaster: set it to "no" and use "ssh -fNM " to initiate the master connection manually. Otherwise, if you have two terminals, run "ssh " on the first, then on the second, then quit it on the first, the terminal will be occupied by the ssh process until you quit it on the second as well. This is mostly annoying and contra-productive, especially with mc (ssh over commandline, fishfs), sshfs, etc. ControlPath: Be sure to append the "Host *" match at the VERY END of the file, so that you can override it in any entries placed before it (ssh_config(5) is last-match). For instance, if you have two aliases for the same host (say, "Host herch\n Hostname 192.168.x.y" and "Host hercv\n Hostname herc.vpn.xxx"), you want them to share a ControlPath, not use different ones. Advantage: you do not only not have the tcp connect overhead, but also the cryptographic overhead. This is especially good if one of the two boxen is slow. It also makes cvs-over-ssh (which is the One True Way™ to use cvs, unless you mirror the repo locally, which again is a good idea anyway for everything except cvs ci) a really nice experience, as commands are done almost instantly. Passwordless keys: bad bad bad. If you must, try to use ssh-agent and password-protected keys instead. Really. (There's even ssh agent forwarding, for the adventurous.) I have small scripts "m_0" and "m_1" which kill or create a master connection with/and a pidfile (using ctl. and pid., respectively). Add Comment
|
Calendar
QuicksearchSupportRecent EntriesExploiting the Ubiquisys/SFR femtocell webserver (wsal/shttpd/mongoose/yassl embedded webserver)
Wednesday, August 3 2011 So what happened recently... Wednesday, April 6 2011 Debian 6.0 ‘squeeze’ Sunday, February 6 2011 exim remote vulnerability Thursday, December 9 2010 Will my Phone Show An Unencrypted Connection? Wednesday, September 8 2010 smpCTF 2010 quals writeups Sunday, August 8 2010 protocol design fail: MMS notification Wednesday, July 28 2010 acrobat reader stealing my passwords Tuesday, June 29 2010 UnrealIRCd backdoored Saturday, June 12 2010 fail of the day: opera Wednesday, June 9 2010 ArchivesCategoriesTag cloud23c3 acpi advertising annouce announce april argh art awards bash blogging bugs c cli code config configuration data mining debconf debian dell dns documentation email errm? events exploit fail fail2ban filesharing films flame fun gcc google graphs grml hacking hacks hardware heise information installation internet irc knowledge libacpi links linux monitoring network networking news newsbeuter nonsense omg openoffice opera passwords php phrack piratebay power privacy programming qa random blurb rant release releases rss scripts security service setup shell sms software spam ssh stfl stuff terminal tests text mode tip tips tools troubleshooting user video vim.editing web websites wikipedia wordpress wtf www youtube zsh
|
|||||||||||||||||||||||||||||||||||||||||||||||||