You should be able to use rsync -e ssh and call it from system agent
Don Littlefield II wrote:
Hi there folks,
I need some advice on how to do what I initially thought would be a simply thing.
Basically, on a scheduled basis, I need to rsync some files between hostA to hostB.
I have to make use of SSH for the connection which is where my troubles are coming in. As this process needs to be automated and hands off, I need to make the authentication happen automatically.
Interactively, I can run ssh-agent and then ssh-add to get rsync to continue without a prompt. However, as this process needs to be scripted and work after reboots with no fiddling...im in a bit of a rut.
I cannot see how I can get ssh-agent running as a service. I've seen some posts from folks on this, but I tried their methods to no avail. While I do get ssh-agent running as a service, the needed env variables are not set and so ssh-add does not work.
Maybe there is some other workaround to this or there is some better solution you folks can think of. My only other possibility is using a Perl script I wrote using SCP to do the sync with Net::SCP::Expect.., but...rsync is more robust and hence I would like to stick with it.
Any ideas appreciated!
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/