ssh -W/ControlPersist bug (was: Problemes with ControlPersist)

Joachim Schipper joachim at joachimschipper.nl
Tue Mar 15 08:46:06 EST 2011


On Mon, Mar 14, 2011 at 09:01:36PM +0100, Klaus Ethgen wrote:
> Am Mo den 14. Mär 2011 um 20:34 schrieb Joachim Schipper:
> > > 1. When I use ControlPersist in combination with ProxyCommand to reach a
> > >    other host over that proxy I get the following message:
> > >       Bad packet length 1397966893.
> > >       Disconnecting: Paket corrupt
> > > 
> > >    When I first ssh to the proxy, close the connection (that
> > >    persists in background) and ssh to the target everything works
> > >    well.
> > 
> > I use this in .ssh/config, and it works for me (and has been working for
> > a long time):

> All works well when I comment out the ControlPersist line. (...)

It works for me, too, if I disable ControlPersist.

ssh.cwi.nl is running a really old and grotty "OpenSSH_4.2p1, OpenSSL
0.9.8a 11 Oct 2005", but the following (minimal, nonsensical)
configuration (on my OpenBSD-current box) gets me the same error message:

Host *
	ControlMaster auto
	ControlPath ~/.ssh/mux-%r@%h:%p
	ControlPersist 3m
	HashKnownHosts yes

Host ssh.cwi.nl
	ProxyCommand ssh -W %h:%p localhost
	StrictHostKeyChecking yes

I tried 'ssh ssh.cwi.nl'. The logs are a bit too large to attach, sadly;
see http://www.joachimschipper.nl/posts/20110314/ssh-log and
http://www.joachimschipper.nl/posts/20110314/sshd-log.

> > > 2. When I use cvs over ssh and use ControlPersist and ProxyCommand every
> > >    ssh command will block at the end for exact the time I specify in
> > >    ControlPersist. (Note that I have to start the proxy first like I
> > >    described in the first issue.)
> > 
> > That's a known issue with certain programs (including e.g. Subversion,
> > IIRC), but I don't recall how to fix it. Sorry.
> 
> I think the problems have something common. Maybe its the same.

Yes, in either case the software waits for the ssh process to stop,
instead of just closing the file descriptor. Not really an SSH bug, and
it certainly has nothing to do with the above. I'm sure someone has
solved it before, no?

		Joachim


More information about the openssh-unix-dev mailing list