Networking Forums

Networking Forums > Computer Networking > Linux Networking > rsync question

Reply
Thread Tools Display Modes

rsync question

 
 
bastian
Guest
Posts: n/a

 
      04-16-2007, 10:23 PM
Hello,
I set up a windows 2000 client with cwrsync, what is rsync onto a
windows machine. I want to back up some files on that machine from a
linux server.
My final problem is the password prompt, that keep on asking for the
password lying in rsyncd.secrets on the client site, when I log on
from the linux server.

Anybody here who knows how the --password-file can be used with rsync
the right way?

This following command does not work unfortunately.
linuxserver:~ # rsync -rzv -e ssh tc2backup@192.168.0.129:/cygdrive/c/
software/ /var/baks/ --password-file=/root/password-file/password.txt
tc2backup@192.168.0.129's password:

Thank you
Bastian

 
Reply With Quote
 
 
 
 
ljb
Guest
Posts: n/a

 
      04-17-2007, 01:22 AM
(E-Mail Removed) wrote:
> Hello,
> I set up a windows 2000 client with cwrsync, what is rsync onto a
> windows machine. I want to back up some files on that machine from a
> linux server.
> My final problem is the password prompt, that keep on asking for the
> password lying in rsyncd.secrets on the client site, when I log on
> from the linux server.
>
> Anybody here who knows how the --password-file can be used with rsync
> the right way?
>
> This following command does not work unfortunately.
> linuxserver:~ # rsync -rzv -e ssh tc2backup@192.168.0.129:/cygdrive/c/
> software/ /var/baks/ --password-file=/root/password-file/password.txt
> tc2backup@192.168.0.129's password:


You need to put the option arguments (--password-file=...) before the
source and destination arguments (tc2backup@...).
 
Reply With Quote
 
bastian
Guest
Posts: n/a

 
      04-17-2007, 02:56 PM
Hello,

I tried this too - well actually at the beginning - sorry I did not
write it down so you know about it.

linuxserver:~/password-file # rsync -rzv -e ssh --password-file=/root/
password-
file/password.txt tc2backup@192.168.0.129:/cygdrive/c/software/agfeo /
var/baks/

tc2backup@192.168.0.129's password:

This will make no difference.

Somebody wrote me and I have read that I will have to tunnel the ssh.
Lets see.

Bastian

 
Reply With Quote
 
Unruh
Guest
Posts: n/a

 
      04-17-2007, 05:53 PM
bastian <(E-Mail Removed)> writes:

>Hello,


>I tried this too - well actually at the beginning - sorry I did not
>write it down so you know about it.


>linuxserver:~/password-file # rsync -rzv -e ssh --password-file=/root/
>password-
>file/password.txt tc2backup@192.168.0.129:/cygdrive/c/software/agfeo /
>var/baks/


Set up the remote machine to do public key authentication rather than
password for your machine.


>tc2backup@192.168.0.129's password:


>This will make no difference.


>Somebody wrote me and I have read that I will have to tunnel the ssh.
>Lets see.


>Bastian


 
Reply With Quote
 
bastian
Guest
Posts: n/a

 
      04-17-2007, 06:44 PM
>
> Set up the remote machine to do public key authentication rather than
> password for your machine.


I think the ssh is set to public key authentication.
The problem is the password in rsyncd.secrets of cwrsync.
Maybe I have a basic misunderstanding here cause I am new to this
stuff.
Please explain.
Thank you
Bastian

 
Reply With Quote
 
Unruh
Guest
Posts: n/a

 
      04-17-2007, 07:02 PM
bastian <(E-Mail Removed)> writes:

>>
>> Set up the remote machine to do public key authentication rather than
>> password for your machine.


>I think the ssh is set to public key authentication.
>The problem is the password in rsyncd.secrets of cwrsync.
>Maybe I have a basic misunderstanding here cause I am new to this


I do not know cwrsync, the windows rsync clone. But, can you ssh from the
windows machine to the linux machine witout a password? if not then that is
almost certainly your problem. If you can, then I do not know. This is
clearly a special windows feature, or at least one I know nothing about.
Sorry.

>stuff.
>Please explain.
>Thank you
>Bastian


 
Reply With Quote
 
Tim S
Guest
Posts: n/a

 
      04-17-2007, 08:09 PM
bastian wrote:

>>
>> Set up the remote machine to do public key authentication rather than
>> password for your machine.

>
> I think the ssh is set to public key authentication.
> The problem is the password in rsyncd.secrets of cwrsync.
> Maybe I have a basic misunderstanding here cause I am new to this
> stuff.
> Please explain.
> Thank you
> Bastian


I think different things are being discussed here, with possibly some slight
confusion (which could be mine). Rsync can run either as a network server
in its own right, in which case rsyncd.secret defined the password and
the "urls" look like:

(E-Mail Removed)in::module/dirreltomodule/dir...

In this case, rsync must be configured using rsync.conf

The other mode is not to run rsync as a server, but to allow it to be
invoked at will via rsh (use to, noone would do that now) or ssh, in both
cases the "url" looks like:

(E-Mail Removed)in:/dirreltoroot/dir/dir...

Note the one vs two colons and in the latter case, no config file is used -
you get what the user is allowed to see.

"--password-file" is incompatible with "-e ssh", the latter is also
unnecessary and is implied by a new (like last few years) rsync *and* the
use of the single colon form of the "url"

Now I haven't actually set up rsync to serve from a windows box, do you have
an ssh server on that box, or are you really trying to do:

rsync -rzv --password-file=/root/password-file/password.txt
tc2backup@192.168.0.129::cdrive/software/.
/var/baks/

Which would work is you set up an rsyncd.conf file to with a "module"
called "cdrive" which pointed at /cygdrive/c

eg (rsyncd.conf)

# rsyncd config
log file = /somewhere/rsyncd.log
max connections = 5
read only = yes
list = yes
auth users = root
secrets file = /somewhere/rsyncd.secrets
strict modes = yes
hosts allow = your.backup.machine.domain
transfer logging = yes
timeout = 0
dont compress = *
#
[cdrive]
path = /cygdrive/c

###############################

Now you *can* do what you want above.

Pros/cons:

SSH mode
========
Pro: Secure, encrypted and as strong as SSH.

Con: Need to ssh in to target host as root/admin to access all files for
backup - therefore, unless using a restrictive shell it is possible to ssh
in as root/admin from the backup box if it gets hacked. Also, can be
controlled remotely.

Con: Needs an ssh server.

Server Mode
===========
Pro: Not encrypted, but reasonably secure on a switched LAN, using passwords
and/or IP restrictions.

Pro: Can export read-only as root/admin, so no change of back-feeding it,
but whilst it can also access a subset of files as root/admin.

Con: Security can be far too weak in the wrong environments.

Now, there is a way to run it in server mode, over ssh, which takes out the
cons of both methods - but I have never had need to try it.

I refer you to the rsyncd.conf man page, and see the section:

RUNNING AN RSYNC SERVER OVER A REMOTE SHELL PROGRAM

Not sure if any of that helps...

Tim
 
Reply With Quote
 
bastian
Guest
Posts: n/a

 
      04-18-2007, 07:30 AM
Hello,
since I also have to type in the password if I only ssh you have been
right and my public key authentication is not working.
Bastian

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Rsync Mtek Linux Networking 21 07-25-2008 12:59 AM
How to get log file for rsync operation? Does rsync also delete remote files? Goran Ivanic Linux Networking 9 05-05-2008 04:58 PM
Question about rsync Jim T. Kirk Linux Networking 23 03-24-2008 01:21 PM
question about rsync bahoo Linux Networking 2 03-25-2007 09:40 PM
question about rsync bahoo Linux Networking 2 03-21-2007 11:54 PM



1 2 3 4 5 6 7 8 9 10 11