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

Re: rsync question




On Feb 6, 2015 11:14 PM, "Don Armstrong" <don@debian.org> wrote:
>
> On Sat, 07 Feb 2015, Curtis Vaughan wrote:
> > That seems to work, but here's a problem. Each time it enters a new
> > user directory I have to re-enter the root password. I realize I can
> > just set it up so that I don't have to enter a password at all, but
> > maybe there's a way to set it, so I'd have to only enter the root
> > password once?
>
> The general method is to use ssh connection sharing; you connect once,
> then subsequent connections use the master connection.
>

Just to expand on that, you need to setup ControlMaster (see the man page - this comes with risk - like keeping agent running). This will keep the session open between calls, hence things will run faster (don't have to reestablish session key each time) and you don't reauth (nothing is checked that would require auth).

And further:
You shouldn't be using password auth and should be using keys everywhere. You can also use RSYNC_PASSWORD if using rsync protocol (god please don't do this - any of it - using rsync directly or sending passwords over the wire). You should be able to do this with just rsync (no bash) but I'm not at a computer and can't do that off the top.


Reply to: