Advice on rsync with sudo / ssh agent forwarding

564 views
Skip to first unread message

Yusuf

unread,
Mar 17, 2014, 11:23:08 AM3/17/14
to rundeck...@googlegroups.com
Hi Guys,

Not sure if it's possible but would like to create a rundeck rsync job to sync any directory on any server, I'd like to do this without setting up ssh key pairs between the servers and utilise the permissions rundeck already has (ability to sudo).

I have something like:

rsync -arv --inplace --delete -e "ssh" --rsync-path="sudo rsync" "rundeck@${REMOTE_SERVER}:${REMOTE_DIR}/" "${LOCAL_DIR}/"


but doesn't work and also tried --rsync-path="sudo -E rsync" to keep the ssh agent key available, still no long, what approach do you guys use?

Thanks
Yusuf

chengkai Gmail

unread,
Mar 17, 2014, 11:25:07 AM3/17/14
to rundeck...@googlegroups.com
May be ssh -i your_private_key ...

- From the middle of nowhere
--
You received this message because you are subscribed to the Google Groups "rundeck-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rundeck-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Yusuf

unread,
Mar 17, 2014, 5:25:15 PM3/17/14
to rundeck...@googlegroups.com
I want to avoid littering the servers with keys, ideally want to enable ssh agent forwarding (-A) but don't want to write a custom node executor (not sure how), is there an easy way to enable this? (I understand the risks)

That way I can create rsync jobs between nodes and have the initiating script use the rundeck key via the agent. 
Reply all
Reply to author
Forward
0 new messages