--- openssh-4.2p1/ssh.c~ 2005-09-05 09:49:31.000000000 +0100 +++ openssh-4.2p1/ssh.c 2005-09-05 09:56:34.000000000 +0100 @@ -1247,7 +1247,11 @@ control_client(const char *path) } if (errno == ENOENT) debug("Control socket \"%.100s\" does not exist", path); - else { + else if (errno == ECONNREFUSED) { + debug("Control socket connect(%.100s): %s", path, + strerror(errno)); + unlink(path); + } else { error("Control socket connect(%.100s): %s", path, strerror(errno)); }