- rsync of users' .ssh directories only?
- Posted by Jonathan on March 3rd, 2004
Hi - I'm getting confused with rsync. I'm trying to copy just users' .ssh
direcotories in /home, but I can't seem to do it.
I'm using the following pattern:
rsync -azvvv --include ".ssh/*" --exclude "*" hostname::label /home
Reading man rsync, that would seem to me to be the way to do it, but it
doesn't get anything.
Can anyone give me a clue?
Thanks,
Jonathan
- Posted by chris-usenet@roaima.co.uk on March 4th, 2004
Jonathan <jonathan@bakerbates.spamgone.com> wrote:
This will copy all .ssh directories from a remote host to the same
locations on the local host, using rsh as the connection mechanism
(add "-e ssh" if you prefer to use ssh instead of rsh).
cd / && rsync -azRP remotehost:'/home/*/.ssh*' /
Is this what you're after?
1. Won't that exclude all files?
2. That requires a remote rsync server (you've used :: instead of
,
which generally I'd consider to be a Bad Thing.
Chris
- Posted by Jonathan on March 4th, 2004
<chris-usenet@roaima.co.uk> wrote in message
news:1h9jh1-gua.ln1@moldev.cmagroup.co.uk...
Thanks, but I can't use ssh becuase the host's configured not to allow
password auth, and rsh isn't running. That's why I'm doing it this way. The
following gets all the directories, but not the files in them:
--include "/*" --include ".ssh/*" --include ".ssh/" --exclude "*"
I'm going to have to read every word of that man page, I can see...
JJ