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 EntriesTwo weeks with the n900
Monday, February 8 2010 Chomsky garden gnome Wednesday, December 23 2009 wikileaks released 9/11 pager messages Thursday, November 26 2009 Mandelbrot in 3D Sunday, November 22 2009 ssl and ssh multiplexing using sslh Thursday, October 29 2009 gcc and printf/puts optimizations Thursday, September 17 2009 security of scponly/sftp-server in combination with apache Friday, August 14 2009 another note to the keysigning debacle Wednesday, August 5 2009 pwnie award nominations 2009 Saturday, July 25 2009 browser history sniffing without JS Monday, June 15 2009 ArchivesCategoriesTag cloud23c3 acpi advertising annouce announce april argh art awards bash blogging browser bugs c cli code config configuration copyright data mining debconf debian dell dns documentation email errm? events fail filesharing films flame fun gcc google graphs grml hacking hacks hardware heise images information installation irc knowledge libacpi links linux mail monitoring network networking news newsbeuter nonsense omg openoffice open source opera passwords php phrack piratebay privacy programming qa random blurb rant release releases rss scripts security service setup shell software ssh stfl stuff terminal tests text mode tip tips tools troubleshooting user video vim.editing web web 2.0 websites wikipedia wordpress wtf www youtube zsh
|
|||||||||||||||||||||||||||||||||||||||||||||||||