[plug] tip: weird ssh/scp/sftp hangs, cvs hangs

Craig Ringer craig at postnewspapers.com.au
Sun May 9 03:03:29 WST 2004


Hi folks

This message is badly written. Sorry, but it's 3:00AM, and I'm just
trying to get this out quickly, for the archives as much as anything -
and for the sake of anybody else's sanity who may run into this later.

If at you ever encounter some of the following symptoms:

cvs using :ext: with ssh hangs indefinitely instead of exiting, leaving
the cvs server process hanging on read() (taking a kill -9 to get rid of
it). Using :fork: on the CVS server, it works fine. sshd processes are
also left dangling after the client's ssh is killed. Tweaking
compression, privsep, etc don't seem to help.

ssh works fine, as does ssh port forwarding etc, but sftp hangs when
trying to copy a file and scp hangs _after_ copying a file.

ssh hangs when you do this:
cat /some/local/file | ssh server "cat > /tmp/stuff"
... but works fine for an interactive shell and port forwarding.

... consider the possibility that you have a bad hosts entry or reverse
DNS entry for the client. I spent quite a bit too long tearing my hair
out over this, as even at DEBUG2 sshd and ssh showed no useful info,
there was nothing interesting in the tcpdumps, etc. I could scp
server->client but not client->server. I eventually removed an IPv6
hosts entry from the server's hosts file ... and it all worked again. I
don't see what's different about that entry, none of the others (v4 or
v6) have ever caused a problem, but nonetheless pulling it worked.

The symptoms of this problem are just _bizarre_.

Craig Ringer




More information about the plug mailing list