Mailinglist Archive: opensuse (4633 mails)

< Previous Next >
Re: [opensuse] rsync syntax
  • From: Mike Noble <mgnoble@xxxxxxxxx>
  • Date: Sun, 24 Dec 2006 14:06:51 -0800
  • Message-id: <200612241406.51956.mgnoble@xxxxxxxxx>
On Sunday 24 December 2006 13:53, Mike Noble wrote:
> On Sunday 24 December 2006 12:23, Carl Hartung wrote:
> > Hi All,
> >
> > I need to start synchronizing a 'live' website, nightly, with the
> > 'master' copy residing under ~/public_html/ on my local box.
> >
> > I have user account level ssh access to the server and, when I log in, it
> > 'lands' me at /home/user/ ('~/'), directly above the 'live' website
> > directory at ~/public_html/ (is symlinked to ~/www/).
> rsync -a -e ssh --delete <path to ~>/public/ <remote
> machine>:/home/user/www
> Mike

One more thing on this is ssh will require you to enter your passwd. This
does not work with trying to automate (running from cron). To fix this
on the local machine (machine sync'ing from) you want to setup ssh
keys, this can be don with the following command:

ssh-keygen -t dsa

(just enter return for all questions)

Now you want to copy the key to the remote machine.

cd ~/.ssh
scp <remote machine>:/home/user/.ssh
ssh into the remote machine
cd .ssh
cat >> authorized_keys
(NOTE: make sure the home directory does not allow other write
permission (best to prevent group as well) or ssh will see this as
a security issue and will not work).

Now if you exit out, and if you ssh into the remote machine again you
will not be asked for a password.

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups