Rsync with script

Sarabjit Singh sarab at transbeam.com
Tue Feb 12 06:03:00 EST 2002


I am sorry, its not working.
I have a server, lets call it 'server'
I have a backup, lets call it 'backup'

I run ssh-keygen on backup and then copy idendity.pub to
server:~/.ssh/authorized_keys
then I try to run ssh from server to backup but it asks me for password. I
dont know what I am doing wrong.
Please explain what to do after generating the key on backup.

Thanks


-----Original Message-----
From: rsync-admin at lists.samba.org [mailto:rsync-admin at lists.samba.org]On
Behalf Of tim.conway at philips.com
Sent: Monday, February 11, 2002 1:28 PM
To: Sarabjit Singh
Cc: rsync at lists.samba.org; rsync-admin at lists.samba.org
Subject: Re: Rsync with script


Here's the procedure.  the mv and rm steps are just what i did preserving
my existing config.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
tconway at atlas
/users/tconway>mv .ssh .ssh.saved
tconway at atlas
/users/tconway>ssh-keygen
Generating public/private rsa1 key pair.
Enter file in which to save the key (/users/tconway/.ssh/identity):
Created directory '/users/tconway/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /users/tconway/.ssh/identity.
Your public key has been saved in /users/tconway/.ssh/identity.pub.
The key fingerprint is:
47:f9:c2:28:66:ee:4b:a9:c8:ce:46:c3:80:d4:04:69 tconway at atlas
tconway at atlas
/users/tconway>rm -rf .ssh
tconway at atlas
/users/tconway>mv .ssh.saved .ssh
tconway at atlas
/users/tconway>
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
On the cygwin side:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
tconway at FLATUSWIN ~
$ ssh  atlas uname -a
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Bad ownership or mode(0644) for '/home/tconway/.ssh/identity'.
It is recommended that your private key files are NOT accessible by
others.
Enter passphrase for RSA key 'tconway at atlas':

tconway at FLATUSWIN ~
$ ls -l .ssh
total 2
-rw-r--r--   1 tconway  None          332 Dec 11 14:27 authorized_keys
-rw-r--r--   1 tconway  None          528 Dec 11 14:24 identity
-rw-r--r--   1 tconway  None          332 Dec 11 14:24 identity.pub
-rw-r--r--   1 tconway  None          679 Jan  6 18:55 known_hosts

tconway at FLATUSWIN ~
$ chmod go-r .ssh/identity

tconway at FLATUSWIN ~
$ ls -l .ssh
total 2
-rw-r--r--   1 tconway  None          332 Dec 11 14:27 authorized_keys
-rw-------   1 tconway  None          528 Dec 11 14:24 identity
-rw-r--r--   1 tconway  None          332 Dec 11 14:24 identity.pub
-rw-r--r--   1 tconway  None          679 Jan  6 18:55 known_hosts

tconway at FLATUSWIN ~
$ ssh  atlas uname -a
SunOS atlas 5.7 Generic_106541-18 sun4u sparc SUNW,Ultra-5_10

tconway at FLATUSWIN ~
$
++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Tim Conway
tim.conway at philips.com
303.682.4917
Philips Semiconductor - Longmont TC
1880 Industrial Circle, Suite D
Longmont, CO 80501
Available via SameTime Connect within Philips, n9hmg on AIM
perl -e 'print pack(nnnnnnnnnnnn,
19061,29556,8289,28271,29800,25970,8304,25970,27680,26721,25451,25970),
".\n" '
"There are some who call me.... Tim?"




"Sarabjit Singh" <sarab at transbeam.com>
Sent by: rsync-admin at lists.samba.org
02/11/2002 09:50 AM


        To:     <rsync at lists.samba.org>
        cc:     (bcc: Tim Conway/LMT/SC/PHILIPS)
        Subject:        Rsync with script
        Classification:



Hi,
I am trying to mirror a server every night using rsync. I have to backup
multiple directories and multiple individual files. I also want to use ssh
as transport.

The problem is that I cannot get ssh to work without asking password for
each step. I tried the public key thing but it doesnt work.
Can some one give instructions for a layman like me.
Also I want to know how to pass argument to sync multiple files and
directories by running rsyn just once.

I am running Redhat linux 7.2.
Thanks










More information about the rsync mailing list