|
||||||||
|
|
#1
|
|
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 bastian |
|
#2
|
|||
|
|||
|
(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@...). |
|
#3
|
|||
|
|||
|
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 |
|
#4
|
|||
|
|||
|
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 |
|
#5
|
|||
|
|||
|
>
> 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 |
|
#6
|
|||
|
|||
|
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 |
|
#7
|
|||
|
|||
|
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 |
|
#8
|
|||
|
|||
|
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 |
![]() |
| Tags |
| question, rsync |
| Thread Tools | |
| Display Modes | |
|
|