Mike James on 30 Dec 2013 10:50:57 -0800


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] rsync over SSH problems


oops, ignore the "-b" option - it shouldn't be in there.


On Mon, Dec 30, 2013 at 1:50 PM, Mike James <mpjames53@gmail.com> wrote:
I use this construction, where the same username exists on all 3 machines and I've distributed the keys appropriately

rsync -avz -e "ssh -b <middle_host> ssh" ${FILE_LIST} <target_host>:${TARGET_DIRECTORY}/



On Mon, Dec 30, 2013 at 12:33 PM, Michael Leone <turgon@mike-leone.com> wrote:
Hoping someone can shed some light on what I am doing wrong here. I
want to rsync a directory (and it's sub-directories) from a machine on
my trusted LAN over to my DMZ. The machine I am doing this from
already has it's keys in the trusted hosts of the DMZ machine.

$ sudo rsync -ravzhq --dry-run --log-file=/tmp/rsync.log
--remove-source-files /my-area/ ssh
<DMZ-account>@<IP-of-DMZ>:/my-area/
<DMZ-account>@<IP-of-DMZ>'s password:
rsync: link_stat "/home/vadmin/ssh" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous
errors) (code 23) at main.c(1057) [sender=3.0.6]

So what's going on here? Why is it looking for a home directory for
"vadmin" on the DMZ? That account doesn't exist out there, it's a
local account on the trusted side, that I am running the command from.
Why isn't it copying over /my-area to the DMZ, and using the
<DMZ-account> (which does have access to the /my-area on the DMZ)?

Eventually this will go into a cron job. I have an existing script that does

ssh <DMZ-account>@<IP-of-DMZ> "execute-remote-script" && rsync
<DMZ-account>@<IP-of-DMZ>:/other-dir/ /dir-here/

so I figure this *should* work. But this time I am not initiating an
SSH connection, and then rsyncing, but instead trying to use the SSH
directory from just the rsync command. Could that be the problem?
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug


___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug