I recently switched to darcs 2.0 because of my switch to Arch Linux. When I was trying to push an update to my DokuWiki repository it connected and then just froze. It took me a while to find out what was going on, but when I tried to log onto my server and it didn't work it dawned on me that I had just blacklisted my self.
I'm using iptable's rate limit support to block too fast SSH connection attempts. The problem was that darcs used a new SSH connection for pulling each single patch. This was obviously changed in darcs 2.0 for whatever reason. The solution is simple - just add the following line to your ~/.darcs/defaults:
ALL ssh-cm
What it does is enabling the SSH ControlMaster feature when connecting to the server. This is a pretty useful feature not only for darcs but for all SSH connections. Instead of always opening new connections it will just open one and create a socket where other SSH connections can hook on. This means you will only be asked once for your password or key passphrase as long as one of the connections to the host is still open.
To enable the ControlMaster feature by default, just add the following lines to your /etc/ssh/ssh_config:
Host * ControlMaster auto ControlPath ~/.ssh/master-%r@%h:%p
It will also make subsequent connection attempts a tiny bit faster because the whole key checking handshake stuff will be omitted.
This is the personal web site of Andreas Gohr
- human being, blogger and web geek from Berlin, Germany.
This page was last updated at
2008/06/02 21:30.
Imprint/Impressum
Most popular:
Recent readers:
Also, this switch should not be necessary if you have darcs2 on both ends. The reason is that darcs2 has a new (hidden) command that lets it fetch all files using a single connection. The command (darcs transfer-mode) acts as a poor man's ftp; it only fetches files. This could be helpful is ssh-cm is not an option.