<p><pre><code> changing the line (and what follows is just one line with badly similated
line wrapping) from this:
ssh-dss AAAAB3NzaC1kc3MAAAEBAKYJenaYvMG3nHwWxKwlWLjHb77CT2hXwmC8Ap...
to this [4]:
from="10.1.1.1",command="/home/remoteuser/cron/validate-rsync" ssh-dss AAAAB3Nza...
[...] script that looks something like this :
#!/bin/sh
case "$SSH_ORIGINAL_COMMAND" in
*\&*)
echo "Rejected"
;;
*\(*)
echo "Rejected"
;;
# ...
rsync\ --server*)
$SSH_ORIGINAL_COMMAND
;;
*)
echo "Rejected"
;;
esac
</code></pre>
All this and later comments is why one <i>should not</i> use SSH for batch jobs,
and for unsupervised rsync file transfer in particular. Using SSH as
a transport makes too complex system, and the script above is a fine example
of getting it almost correct, but not quite (not using STDERR and not
signaling an error with exit code are but two things that are wrong with the
script).<p>Wrapping rsync in stunnel (<a href="http://dozzie.jarowit.net/trac/wiki/RsyncSSL" rel="nofollow">http://dozzie.jarowit.net/trac/wiki/RsyncSSL</a>) is
much saner approach.