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

Re: [cobalt-users] RSYNC - Automation. with out password



1. On your backup machine:
As root or the user that this script will be running as run the command
'ssh-keygen -t dsa'. When prompted for a passphrase just hit return.

In the home directory of the user that you just created the ssh keys for.
The file $HOME/.ssh/id_dsa.pub  This key needs to be place on all machines
that are to be backed up.

2.  On the client (raq server):
Add id_dsa.pub from the server to the client in $HOME/.ssh/authorized_hosts2
    a.  (from the backup machine) Copy the file to the raq: scp id_dsa.pub
root@xxxxxxx:/root
    b.  (on the raq server) Append the id_dsa.pub to the authorized_hosts2
file:
        cat /root/id_dsa.pub >> /root/.ssh/authorized_hosts2

3.  Test...
You should now be able to ssh from the backup machine to the raq without
being prompted for a password.
from the backup machine: ssh 1.1.1.1

You should not be able to ssh from the raq to the backup machine without a
password.  If you want this to happen, just reverse the procedure above.

4.  Create the cron job

Also, take a look at http://www.linux-backup.net  they have a section
detailing backups with rsync.

Good luck.

Kevin

> I want to use Rsync for backup purpose. I am planning to use the SSH as
the
> carrier. There is option avilable with rsync command for this. But when
ever I
> use this command with SSH functionality it is asking password.  Inspite of
> giving the file name "containing the password" in command  rsync is still
> prompting for password.
>
> Actually I want to automate Rsync through cronjob. But how to manage
giving
> the passwords again and again. while using RSYNC with SSH Is there any
option
> to set the password in any file and the rsync will take the password from
> there.