Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
Hi, I am trying to backup my CentOS5.5 webserver to our local windows sbs 2003 server in the office. I have set up ssh and cwrsync on the windows server ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2011
    Location
    London
    Posts
    7

    rsync via ssh from linux to windows sbs 2003 protocol mismatch


    Hi,

    I am trying to backup my CentOS5.5 webserver to our local windows sbs 2003 server in the office. I have set up ssh and cwrsync on the windows server and have confirmed that the linux server can reach the windows server via the command:

    ssh RemoteUser{AT}xxx.xxx.xxx.xxx

    It asks for a password and connects fine. However when I run this command to start the backup:

    rsync -avz -e ssh home/account/public_html/some/small/directory/ remote_user{AT}xxx.xxx.xxx.xxx:/cygdrive/c/backup/destination/directory/

    I get this error after entering the password:

    protocol version mismatch -- is your shell clean?

    and then it dies.

    Has anyone got any ideas?

    Thanks

    Alex

    PS I had to use {AT} instead of the proper character as the forum thought I was posting a URL

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    This might be related to the SSH version being used on both ends. I would start by looking at the SSH configurations on both machine to ensure they are both using v2.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined!
    Join Date
    Feb 2011
    Location
    London
    Posts
    7
    After more digging it seems it is not about the version of ssh but:

    The "is your shell clean" message and the "protocol mismatch"
    message are usually caused by having some sort of program
    in your .cshrc, .profile, .bashrc or equivalent file that
    writes a message every time you connect. Data written
    in this way corrupts the rsync data stream. rsync detects this
    at startup and produces those error messages.


    (via infoscience.co.jp/technical/rsync/original/FAQ.html)

    But as I am connecting to a windows machine, I am not quite sure how to deal with this?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    How are you authenticating to the server when you do your rsync?
    Does the shell do anything other then login?

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  6. #5
    Just Joined!
    Join Date
    Feb 2011
    Location
    London
    Posts
    7
    I log into linux server via root

    When I connect to ssh on windows are entering password I get this response:

    Microsoft Windows [Version 5.2.3790]
    (C) Copyright 1985-2003 Microsoft Corp.
    Last login: Tue Feb 22 11:34:21 2011 from 217.196.232.174
    C:\Documents and Settings\Administrator.INDIGOCLOTHING\Desktop>

  7. #6
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    From what I have been reading this might be your issue. The shell is sending information that is causing rsync to choke. Rsyn requires a clean shell. Is there anyway to stop all this output from the shell? sorry I am not a windows person so I don't know how to stop this.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  8. #7
    Just Joined!
    Join Date
    Feb 2011
    Location
    London
    Posts
    7
    Thanks for your help Robert - that was my conclusion too. I'll keep hunting for the answer.

  9. #8
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Just read a web page about changing the prompt permanently in windows.
    If you could change the prompt for the rsync user you should be fine.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  10. #9
    Just Joined!
    Join Date
    Feb 2011
    Location
    London
    Posts
    7
    Thanks - looks useful

  11. #10
    Just Joined!
    Join Date
    Sep 2009
    Posts
    5
    Have you tried dropping the 'v' verbose switch? and just running:

    Code:
    rsync -az -e ssh home/account/public_html/some/small/directory/ remote_user{AT}xxx.xxx.xxx.xxx:/cygdrive/c/backup/destination/directory/
    You could also try reversing the process and mounting the windows directory via CIFS and just rsync the data to the mounted CIFS share.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •