I have been trying to get rsync with ssh to work and have found that even though I have a daemon running it spawns another when I connect (running as the user I sshed as). This was in the enhancements for 2.5.6. I am trying to figure out how i can use the ssh for security but still connect to the daemon that I have running as root so i can back up all of my files that arn't readable by anyone else. I have also noticed that when i connect over ssh I need a rsyncd.conf file in my home directory. This makes sense why you wouldn't want a user editable file that has access to viewing/writing files over the whole system. If anyone knows how I might be able to do this I would appriciate the help Douglas Blood
On Mon, Apr 28, 2003 at 09:35:47AM -0600, Douglas Blood wrote:>I am trying to figure out how i can use the ssh for security but still >connect to the daemon that I have running as root so i can back up all >of my files that arn't readable by anyone else.To do that you need to use ssh's port forwarding facilities since this is not something that rsync supports directly. See the ssh docs for how to start up an ssh connection with a forwarded local port, and then rsync to/from the port on your *local machine* to reach the other end of the secure tunnel (which will connect to the rsync daemon port via a local connection on the remote machine). ..wayne..
On Mon, 28 Apr 2003, Douglas Blood wrote:> I have been trying to get rsync with ssh to work and have found that even > though I have a daemon running it spawns another when I connect (running as > the user I sshed as). This was in the enhancements for 2.5.6. I am trying > to figure out how i can use the ssh for security but still connect to the > daemon that I have running as root so i can back up all of my files that > arn't readable by anyone else. > > I have also noticed that when i connect over ssh I need a rsyncd.conf file > in my home directory. This makes sense why you wouldn't want a user editable > file that has access to viewing/writing files over the whole system. > > If anyone knows how I might be able to do this I would appriciate the helpThe ssh port forwarding seems to work fine using: rsync "--rsh=/usr/bin/ssh -L 23:$REMOTE:23" \ -azR --verbose --progress --stats --force --bwlimit=64 \ $REMOTE::$MODULE $SYNCTO But, as a cron job, I get: WARNING: --rsh or -e option ignored when connecting to rsync daemon Am I missing something on the syntax? Am I supposed to have an rsyncd.conf in /root for a root cron job? -- Regards, *Dangerous* Dave Gawlik LServ.Com WebMaster/Administrator Join www.cauce.org and Ban spam on the Internet
You are attempting to connect to the rsync server(port 873) and use ssh as well (port 22). Rsync only allows one type of connection at a time so it is ignoring the ssh option because it is attempting to connect to the rsync port. This could be fixed if there were 2 seperate commands.. but you would have problems with figuring out which command to kill/finishes when.> The ssh port forwarding seems to work fine using: > > rsync "--rsh=/usr/bin/ssh -L 23:$REMOTE:23" \ > -azR --verbose --progress --stats --force --bwlimit=64 \ > $REMOTE::$MODULE $SYNCTO > > > But, as a cron job, I get: > > WARNING: --rsh or -e option ignored when connecting to rsync daemon > > Am I missing something on the syntax? Am I supposed to have an > rsyncd.conf in /root for a root cron job? > > -- > Regards, > > *Dangerous* Dave Gawlik > LServ.Com WebMaster/Administrator > Join www.cauce.org and Ban spam on the Internet >