When following the instructions to do rsync backups given here: http://troy.jdmz.net/rsync/index.html
I get the error "protocol version mismatch -- is your shell clean?"
I read somewhere that I needed to silence the prompt (PS1="") and motd (.hushlogin) displays to deal with this. I have done this, the prompt and login banner (MOTD) not longer appear, but the error still appears when I run:
rsync -avvvz -e "ssh -i /home/thisuser/cron/thishost-rsync-key" remoteuser@remotehost:/remote/dir /this/dir/
Both ssh client and sshd server are using version 2 of the protocol.
What could be the problem? Thanks.
[EDIT] I have found http://www.eng.cam.ac.uk/help/jpmg/ssh/authorized_keys_howto.html which directs that it is sometimes necessary to "Force v2 by using the -2 flag to ssh or slogin
ssh -2 -i ~/.ssh/my_private_key remotemachine"
It is not clear this solved the problem as I think I put this change in AFTER the error changed but the fact is the error has evolved to something else. I'll update this when I learn more. And I will certainly try the suggestion to run this in an emacs shell - thank you.