Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Dec 2003 16:42:38 +0100
From:      Greg Bernard <bsd@todoo.biz>
To:        <misterb@bmyster.com>
Cc:        "freebsd-questions@FreeBSD. ORG" <freebsd-questions@freebsd.org>
Subject:   Re: rsync and unattended ssh syncing 2 machines
Message-ID:  <BC0B7DFE.225CA%bsd@todoo.biz>
In-Reply-To: <1935.65.162.190.4.1071968218.squirrel@new.host.name>

next in thread | previous in thread | raw e-mail | index | archive | help
Le 21/12/03 1:56, =AB=A0Brent Bailey=A0=BB <misterb@bmyster.com> a =E9crit=A0:

> ive been trying to get rsync to work with  unattended SSH and syncing of
> file systems
> between 2 machines running FBSD 4.9RC. I have rsync installed and i run a
> script like
>=20
> #!/bin/sh
>=20
> remote=3D"192.168.25.12"
>=20
> fslist=3D"/var/mail /var/db/mysql /usr/local/www/data /user2"
>=20
>   for fs in $fslist ;
>   do
>     /usr/local/bin/rsync -avz --delete ${remote}:${fs}/ ${fs}/
>   done
>=20

You need to specify the -e option (cf man rsync).

/usr/local/bin/rsync -e ssh -avz --delete ${remote}:${fs}/ ${fs}/


If you intent to use It as root you need to set up your ssh server so that
It does not require a password when rsync initiate the connexion.

This can be done in a quite "not so secure manner" by providing an empty
password when you generate the ssh key you will be using. Other more tricky
and safer solutions could be used...

More info and quick setup at this link :

http://killyridols.net/tutorials/rsyncssh.html


Good luck... Once It works, It works steadily and for long !

> but when i tail the logs of the remote machine i see..
> Dec 20 19:23:26 doppleganger sshd[24493]: Failed password for root from
> 192.168.25.1 port 4476
>=20
> Anyone have any good luck with doing this ? suggestions ?? any all all
> help is greatly appreciated
>=20
>=20
>=20
> --=20
> Brent
>=20

________________________________________________
=AB?=BB=A5=AB?=BB=A7=AB?=BB=A5=AB?=BB=A7=AB?=BB=A5=AB?=BB=A7=AB?=BB=A5=AB?=BB=A7=AB?=BB=A5=AB?=BB=A7=AB?=BB=A5=AB?=BB=A7
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF
Gregober ---> PGP ID --> 0x1BA3C2FD
omni_osx_ml @at@ todoo.biz
________________________________________________
=AB?=BB=A5=AB?=BB=A7=AB?=BB=A5=AB?=BB=A7=AB?=BB=A5=AB?=BB=A7=AB?=BB=A5=AB?=BB=A7=AB?=BB=A5=AB?=BB=A7=AB?=BB=A5=AB?=BB=A7
=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF=AF




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BC0B7DFE.225CA%bsd>