I'm trying to download files using rsync with rsync running in daemon mode over SSH on the server and get the following error on the client:
rsync -a myserver:/remote/path/ localdestdir/ protocol version mismatch -- is your shell clean? (see the rsync man page for an explanation) rsync error: protocol incompatibility (code 2) at compat.c(176) [Receiver=3.1.1]
The server has this in .ssh/authorized_keys for the user:
command="rsync --config=/path/to/engine-rsyncd.conf --server --daemon ." ssh-rsa ...
I've read all I could find about this problem and, as everyone suggests, checked that the shell is clean and IT IS CLEAN:
ssh myserver false >out.tmp
creates a zero-length file out.tmp (if I remove the "command=..." from authorized_keys on the server).
I also tried setting the user's shell to rssh instead of bash on the server - same thing.
Both client and server are running Ubuntu 16.04, so they have the same version of rsync (3.3.1, protocol 31).
What else could it be? I tried enabling verbose logging in rsync and SSH and the logs don't give me any clue. The rsync daemon doesn't log anything more than
2018/02/12 15:14:24  connect from clienthostname