I am trying to pull some data from an rsync server to a client using
ssh, authorized_keys, and a hard-coded "command=" on the server. I've
been trying to figure it out on my own, but I know I'm missing a detail.
I can ssh from the client to the server without a password no problem.
I'm a bit confused as to what the authorized_keys file should contain on
the server (aside from the key of course). I have this:
command="rsync-3.0.4 --daemon --log-file=/var/log/rsynclog
--config=/etc/rsyncd.conf
</dev/null",no-pty,no-port-forwarding,no-X11-forwarding,no-agent-forwarding
ssh-rsa <the key>
The /etc/rsyncd.conf only contains:
[test]
path = /tmp/test
The problem is that when I try to do something like:
client # rsync -av --rsh=ssh server::test/ /tmp/test
... I get back:
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(453)
[receiver=2.6.9]
and on the server in /var/log/rsynclog I have:
2009/04/15 10:48:09 [13437] rsyncd version 3.0.4 starting, listening on
port 873
Of course this isn't right because when the client disconnects, the
rsync server is still running on port 873 on the server.
I've tried running without --daemon, but then it says that I'm using
daemon options.
I want to be able to connect up with ssh, but still use the "daemon"
mode where I can hard-code the only paths that the client can access
(eventually, read only).
Jason.
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html