Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

problem with rsync-daemon via ssh

3,303 views
Skip to first unread message

Carlos Carvalho

unread,
Feb 13, 2014, 8:38:55 PM2/13/14
to
I'm trying to transfer something to another machine launching a
once-only "daemon" through ssh with this command:

rsync -avv -e "ssh -l user" ./orig/ machine::module/

where "module" is the name of a file in the home dir of user with the
following:

path = /path/to/home/transfer

The ssh connection works without passphrase. This is the error:

opening connection using: ssh -l user machine rsync --server --daemon . (8 args)
rsync: did not see server greeting
rsync error: error starting client-server protocol (code 5) at main.c(1635) [sender=3.1.1pre1]

Am I doing something wrong?
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html

Kevin Korb

unread,
Feb 13, 2014, 9:47:16 PM2/13/14
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

modules are defined in an rsyncd.conf file. That file needs to be in
the home dir of the user.

On 02/13/2014 08:38 PM, Carlos Carvalho wrote:
> I'm trying to transfer something to another machine launching a
> once-only "daemon" through ssh with this command:
>
> rsync -avv -e "ssh -l user" ./orig/ machine::module/
>
> where "module" is the name of a file in the home dir of user with
> the following:
>
> path = /path/to/home/transfer
>
> The ssh connection works without passphrase. This is the error:
>
> opening connection using: ssh -l user machine rsync --server
> --daemon . (8 args) rsync: did not see server greeting rsync
> error: error starting client-server protocol (code 5) at
> main.c(1635) [sender=3.1.1pre1]
>
> Am I doing something wrong?
>

- --
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
Kevin Korb Phone: (407) 252-6853
Systems Administrator Internet:
FutureQuest, Inc. Ke...@FutureQuest.net (work)
Orlando, Florida k...@sanitarium.net (personal)
Web page: http://www.sanitarium.net/
PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlL9g7QACgkQVKC1jlbQAQeeLwCePjYkxSwkpgcVBHXo2FtwxEvV
P14AoO0MpBlDt5Sv9HBeWMdjd7kOucDk
=NaaI
-----END PGP SIGNATURE-----

Carlos Carvalho

unread,
Feb 14, 2014, 6:34:49 AM2/14/14
to
Kevin Korb (k...@sanitarium.net) wrote on 13 February 2014 21:47:
>modules are defined in an rsyncd.conf file. That file needs to be in
>the home dir of the user.

You mean the config file must be called "rsyncd.conf" instead of "module"?
That'd be easy to solve but unfortunately it didn't work. I changed
the name, put the following in it

[module]
path = /path/to/home/transfer

and I still get the same "did not see server greeting" error.

>On 02/13/2014 08:38 PM, Carlos Carvalho wrote:
>> I'm trying to transfer something to another machine launching a
>> once-only "daemon" through ssh with this command:
>>
>> rsync -avv -e "ssh -l user" ./orig/ machine::module/
>>
>> where "module" is the name of a file in the home dir of user with
>> the following:
>>
>> path = /path/to/home/transfer
>>
>> The ssh connection works without passphrase. This is the error:
>>
>> opening connection using: ssh -l user machine rsync --server
>> --daemon . (8 args) rsync: did not see server greeting rsync
>> error: error starting client-server protocol (code 5) at
>> main.c(1635) [sender=3.1.1pre1]

Matthias Schniedermeyer

unread,
Feb 14, 2014, 7:06:58 AM2/14/14
to
On 13.02.2014 23:38, Carlos Carvalho wrote:
> I'm trying to transfer something to another machine launching a
> once-only "daemon" through ssh with this command:
>
> rsync -avv -e "ssh -l user" ./orig/ machine::module/
>
> where "module" is the name of a file in the home dir of user with the
> following:
>
> path = /path/to/home/transfer
>
> The ssh connection works without passphrase. This is the error:
>
> opening connection using: ssh -l user machine rsync --server --daemon . (8 args)
> rsync: did not see server greeting
> rsync error: error starting client-server protocol (code 5) at main.c(1635) [sender=3.1.1pre1]
>
> Am I doing something wrong?

You could say that.

You mixed the options from "remote shell" with "rsync daemon".
Rsync is used either as 'rsync over SSH'(/remote shell) OR daemon-mode.

- synopsis from man-page -
Access via remote shell:
Pull: rsync [OPTION...] [USER@]HOST:SRC... [DEST]
Push: rsync [OPTION...] SRC... [USER@]HOST:DEST

Access via rsync daemon:
Pull: rsync [OPTION...] [USER@]HOST::SRC... [DEST]
rsync [OPTION...] rsync://[USER@]HOST[:PORT]/SRC... [DEST]
Push: rsync [OPTION...] SRC... [USER@]HOST::DEST
rsync [OPTION...] SRC... rsync://[USER@]HOST[:PORT]/DEST
- snip -

In the later case the machine::module-syntax is used (client side) and
target(or server)-rsync must run in daemon-mode on the target machine.

For "rsync over ssh" no conf-file is used at all and all parameters have
to be provied on the commandline (see --conf in man-page)





--

Matthias

Carlos Carvalho

unread,
Feb 14, 2014, 7:16:52 AM2/14/14
to
Matthias Schniedermeyer (m...@citd.de) wrote on 14 February 2014 13:06:
>You mixed the options from "remote shell" with "rsync daemon".
>Rsync is used either as 'rsync over SSH'(/remote shell) OR daemon-mode.

No, there's a third method. Search for
"USING RSYNC-DAEMON FEATURES VIA A REMOTE-SHELL CONNECTION"
in the manual.

Paul Slootman

unread,
Feb 14, 2014, 7:17:10 AM2/14/14
to
On Fri 14 Feb 2014, Matthias Schniedermeyer wrote:
>
> You mixed the options from "remote shell" with "rsync daemon".
> Rsync is used either as 'rsync over SSH'(/remote shell) OR daemon-mode.

Matthias,
Ik recommend you check out the "USING RSYNC-DAEMON FEATURES VIA A
REMOTE-SHELL CONNECTION" part of the manpage.


Paul

Matthias Schniedermeyer

unread,
Feb 14, 2014, 8:34:36 AM2/14/14
to
On 14.02.2014 13:17, Paul Slootman wrote:
> On Fri 14 Feb 2014, Matthias Schniedermeyer wrote:
> >
> > You mixed the options from "remote shell" with "rsync daemon".
> > Rsync is used either as 'rsync over SSH'(/remote shell) OR daemon-mode.
>
> Matthias,
> Ik recommend you check out the "USING RSYNC-DAEMON FEATURES VIA A
> REMOTE-SHELL CONNECTION" part of the manpage.

I would say, the synopsis needs an update.

I vaguely remembered postings meantioning this mode, but not that it was
"officially supported", seams i was wrong in that regard and it boils
down to what Kevin Korb said: rsync expects it's conf in the
home-directory and according to --conf it's called rsyncd.conf (not
.rsyncd.conf?)



--

Matthias

Kevin Korb

unread,
Feb 14, 2014, 12:51:35 PM2/14/14
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Try running that ssh command line yourself and see what it says.

On 02/14/2014 06:34 AM, Carlos Carvalho wrote:
> Kevin Korb (k...@sanitarium.net) wrote on 13 February 2014 21:47:
>> modules are defined in an rsyncd.conf file. That file needs to
>> be in the home dir of the user.
>
> You mean the config file must be called "rsyncd.conf" instead of
> "module"? That'd be easy to solve but unfortunately it didn't work.
> I changed the name, put the following in it
>
> [module] path = /path/to/home/transfer
>
> and I still get the same "did not see server greeting" error.
>
>> On 02/13/2014 08:38 PM, Carlos Carvalho wrote:
>>> I'm trying to transfer something to another machine launching a
>>> once-only "daemon" through ssh with this command:
>>>
>>> rsync -avv -e "ssh -l user" ./orig/ machine::module/
>>>
>>> where "module" is the name of a file in the home dir of user
>>> with the following:
>>>
>>> path = /path/to/home/transfer
>>>
>>> The ssh connection works without passphrase. This is the
>>> error:
>>>
>>> opening connection using: ssh -l user machine rsync --server
>>> --daemon . (8 args) rsync: did not see server greeting rsync
>>> error: error starting client-server protocol (code 5) at
>>> main.c(1635) [sender=3.1.1pre1]
>

- --
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
Kevin Korb Phone: (407) 252-6853
Systems Administrator Internet:
FutureQuest, Inc. Ke...@FutureQuest.net (work)
Orlando, Florida k...@sanitarium.net (personal)
Web page: http://www.sanitarium.net/
PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlL+V6YACgkQVKC1jlbQAQc0FQCfRauXatoAanEb8EnUew2Fovni
VRoAn1gLwWIx8i8tDnZ/E++hrcw5dYJQ
=E4zU
-----END PGP SIGNATURE-----

Carlos Carvalho

unread,
Feb 17, 2014, 9:02:55 PM2/17/14
to
Kevin Korb (k...@sanitarium.net) wrote on 14 February 2014 12:51:
>Try running that ssh command line yourself and see what it says.

Doesn't say anything. But rsync is indeed run. I changed it to this
script:

#!/bin/bash

echo "run!"
echo "run!"

and

ural# rsync -avv -e "ssh -l root" ./orig/ machine::module/
opening connection using: ssh -l root machine rsync --server --daemon . (8 args)
rsync: server sent "run!" rather than greeting
rsync error: error starting client-server protocol (code 5) at main.c(1635) [sender=3.1.1pre1]

Using a higher debugging (with the real rsync):

ural# rsync -a --debug=all4 -e "ssh -l root" ./orig/ machine::module/
FILE_STRUCT_LEN=24, EXTRA_LEN=4
cmd=ssh -l root machine=machine user=<NULL> path=module/
cmd[0]=ssh cmd[1]=-l cmd[2]=root cmd[3]=machine cmd[4]=rsync cmd[5]=--server cmd[6]=--daemon cmd[7]=.
opening connection using: ssh -l root machine rsync --server --daemon . (8 args)
msg checking charset: ANSI_X3.4-1968
[sender] safe_read(5)=0
rsync: did not see server greeting
[sender] _exit_cleanup(code=5, file=main.c, line=1635): entered
rsync error: error starting client-server protocol (code 5) at main.c(1635) [sender=3.1.1pre1]
[sender] _exit_cleanup(code=5, file=main.c, line=1635): about to call exit(5)
[sender] sending MSG_ERROR_EXIT with exit_code 5
[sender] send_msg_int(86, 5)

So rsync is run at the remote end but doesn't answer with the server
greeting the client expects.

>On 02/14/2014 06:34 AM, Carlos Carvalho wrote:
>> Kevin Korb (k...@sanitarium.net) wrote on 13 February 2014 21:47:
>>> modules are defined in an rsyncd.conf file. That file needs to
>>> be in the home dir of the user.
>>
>> You mean the config file must be called "rsyncd.conf" instead of
>> "module"? That'd be easy to solve but unfortunately it didn't work.
>> I changed the name, put the following in it
>>
>> [module] path = /path/to/home/transfer
>>
>> and I still get the same "did not see server greeting" error.
>>
>>> On 02/13/2014 08:38 PM, Carlos Carvalho wrote:
>>>> I'm trying to transfer something to another machine launching a
>>>> once-only "daemon" through ssh with this command:
>>>>
>>>> rsync -avv -e "ssh -l user" ./orig/ machine::module/
>>>>
>>>> where "module" is the name of a file in the home dir of user
>>>> with the following:
>>>>
>>>> path = /path/to/home/transfer
>>>>
>>>> The ssh connection works without passphrase. This is the
>>>> error:
>>>>
>>>> opening connection using: ssh -l user machine rsync --server
>>>> --daemon . (8 args) rsync: did not see server greeting rsync
>>>> error: error starting client-server protocol (code 5) at
>>>> main.c(1635) [sender=3.1.1pre1]

Kevin Korb

unread,
Feb 17, 2014, 9:13:27 PM2/17/14
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

OK, I just did a quickie test. When I 'ssh user@host rsync --daemon
- --server .' an I don't have an rsyncd.conf file in my home dir I get
no output like you do (an error message here would be nice). If I do
have a proper rsyncd.conf file I get rsyncd's server banner.

So, what's in your /root/rsyncd.conf file?
- --
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
Kevin Korb Phone: (407) 252-6853
Systems Administrator Internet:
FutureQuest, Inc. Ke...@FutureQuest.net (work)
Orlando, Florida k...@sanitarium.net (personal)
Web page: http://www.sanitarium.net/
PGP public key available on web site.
~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~'`^`'~*-,._.,-*~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlMCwccACgkQVKC1jlbQAQf0+QCguy704ehmlbRnKAdzmnw3xVb1
G3AAnjxSxbH13WkDGwpYTjFV3j0ew1tT
=TzJg
-----END PGP SIGNATURE-----

Carlos Carvalho

unread,
Feb 19, 2014, 12:57:43 PM2/19/14
to
Kevin Korb (k...@sanitarium.net) wrote on 17 February 2014 21:13:
>OK, I just did a quickie test. When I 'ssh user@host rsync --daemon
>- --server .' an I don't have an rsyncd.conf file in my home dir I get
>no output like you do (an error message here would be nice). If I do
>have a proper rsyncd.conf file I get rsyncd's server banner.

I get nothing. However, changing machines I do get the

@RSYNCD: 31.0

banner... So it seems there's a problem between these machines.

I switched to a few other pairs of machines running without root and
everything works, after I change the default to not use chroot.

Maybe there's some problem with running as root. Anyway running as
a normal user is enough for me now, so I won't investigate further.

Thanks for paying attention.
0 new messages