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 EntriessmpCTF 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 fail2ban + dns = fail Wednesday, May 26 2010 evolution of spam or WTF is this! Friday, March 19 2010 if you type google into google... Wednesday, March 17 2010 Two weeks with the n900 Monday, February 8 2010 Chomsky garden gnome Wednesday, December 23 2009 ArchivesCategoriesTag cloud23c3 acpi advertising annouce announce april argh art awards blogging browser bugs cli code config configuration copyright data mining debconf debian dns documentation email errm? events fail fail2ban filesharing films flame fun gcc google graphs grml hacking hacks hardware heise information installation internet irc knowledge libacpi links linux mail monitoring network networking news newsbeuter nonsense omg openoffice open source opera passwords php phrack piratebay power privacy programming qa random blurb rant release releases rss scripts security service setup shell software spam ssh stfl stuff terminal tests text mode tip tips tools troubleshooting unix video vim.editing web web 2.0 websites wikipedia wordpress wtf www youtube zsh
|
|||||||||||||||||||||||||||||||||||||||||||||||||