ssh/scp works but rsync just constantly says “no”

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












Hi I have a windows 2003 server that I need to back up onto a linux client so I install cygwin on the Win2k3. On the Win2k3 I have enabled ssh, scp but (because the Win2k3 server uses an customised windows SFTP server listening on port 22) I had to set scp / ssh to run on port 222 on cygwin. It works fine. As long as I use ssh/scp and use the -p/-P switch at command line.



I established a SSH Public/Private Key Pair for my user over ssh/scp it works lovely from linux client to Win2k3 server.



I then I start the rsyncd on Win2k3 and add the user in the /etc/rsyncd.conf, created the /etc/rsyncd.secrets and assigned privilages and it seems fine.



Then when I try to rsync connect /not/ over ssh it works but I want to /only/ connect via ssh and when I do that it fails every time with 0 bytes. I have tried multiple users and rewritten the rsyncd.conf a million times but it constantly fails. I am beginning to think I need to tell rsync client that the ssh port is 222 from the clients perspective. If so how do I do it?










share|improve this question

























    up vote
    3
    down vote

    favorite












    Hi I have a windows 2003 server that I need to back up onto a linux client so I install cygwin on the Win2k3. On the Win2k3 I have enabled ssh, scp but (because the Win2k3 server uses an customised windows SFTP server listening on port 22) I had to set scp / ssh to run on port 222 on cygwin. It works fine. As long as I use ssh/scp and use the -p/-P switch at command line.



    I established a SSH Public/Private Key Pair for my user over ssh/scp it works lovely from linux client to Win2k3 server.



    I then I start the rsyncd on Win2k3 and add the user in the /etc/rsyncd.conf, created the /etc/rsyncd.secrets and assigned privilages and it seems fine.



    Then when I try to rsync connect /not/ over ssh it works but I want to /only/ connect via ssh and when I do that it fails every time with 0 bytes. I have tried multiple users and rewritten the rsyncd.conf a million times but it constantly fails. I am beginning to think I need to tell rsync client that the ssh port is 222 from the clients perspective. If so how do I do it?










    share|improve this question























      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      Hi I have a windows 2003 server that I need to back up onto a linux client so I install cygwin on the Win2k3. On the Win2k3 I have enabled ssh, scp but (because the Win2k3 server uses an customised windows SFTP server listening on port 22) I had to set scp / ssh to run on port 222 on cygwin. It works fine. As long as I use ssh/scp and use the -p/-P switch at command line.



      I established a SSH Public/Private Key Pair for my user over ssh/scp it works lovely from linux client to Win2k3 server.



      I then I start the rsyncd on Win2k3 and add the user in the /etc/rsyncd.conf, created the /etc/rsyncd.secrets and assigned privilages and it seems fine.



      Then when I try to rsync connect /not/ over ssh it works but I want to /only/ connect via ssh and when I do that it fails every time with 0 bytes. I have tried multiple users and rewritten the rsyncd.conf a million times but it constantly fails. I am beginning to think I need to tell rsync client that the ssh port is 222 from the clients perspective. If so how do I do it?










      share|improve this question













      Hi I have a windows 2003 server that I need to back up onto a linux client so I install cygwin on the Win2k3. On the Win2k3 I have enabled ssh, scp but (because the Win2k3 server uses an customised windows SFTP server listening on port 22) I had to set scp / ssh to run on port 222 on cygwin. It works fine. As long as I use ssh/scp and use the -p/-P switch at command line.



      I established a SSH Public/Private Key Pair for my user over ssh/scp it works lovely from linux client to Win2k3 server.



      I then I start the rsyncd on Win2k3 and add the user in the /etc/rsyncd.conf, created the /etc/rsyncd.secrets and assigned privilages and it seems fine.



      Then when I try to rsync connect /not/ over ssh it works but I want to /only/ connect via ssh and when I do that it fails every time with 0 bytes. I have tried multiple users and rewritten the rsyncd.conf a million times but it constantly fails. I am beginning to think I need to tell rsync client that the ssh port is 222 from the clients perspective. If so how do I do it?







      linux ssh rsync scp cygwin






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked May 11 '13 at 17:31









      MacLovin

      182




      182




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          6
          down vote



          accepted










          Yes, of course you have to:



          rsync -e 'ssh -p 222' ...


          or:



          RSYNC_RSH='ssh -p 222' rsync ...


          Alternatively, you can specify in ~/.ssh/config that ssh connections to that host are to be on port 222 by default:



          Host that-host
          Port 222





          share|improve this answer




















          • yes that works perfectly thank you
            – MacLovin
            May 11 '13 at 18:31

















          up vote
          0
          down vote













          A very late answer, but one that may help others...



          rsync runs in one of two modes.




          1. You can run it across ssh, and the local rsync process will start an rsync process on the remote system to act as its server, with ssh providing the encrypted transport between the two systems. This mode is indicated by a single colon between the remote host and the remote path:



            rsync /path/to/local/ remote:/path/to/remote



          2. You can run it as a daemon, and the local rsync process will connect directly to an already-running server rsync process. There is no encryption (or ssh) offered with this scenario. This mode is indicated by a double colon between the remote host and the remote path:



            rsync /path/to/local remote::/path/to/remote


          You do not need to install an ssh server and an rsync daemon. Either one or the other is quite sufficient.



          For a secure LAN, or where the file contents are public, the rsync daemon may be more suitable as it does not require users to be able to log on to the remote system. The ssh approach is better for insecure or untrusted networks (i.e. the Internet) but it does require either very careful set up or the ability for users to be able to log on to the remote system.



          In your situation, where you want to be able to connect only over ssh, there is no point configuring or running an rsync daemon.






          share|improve this answer




















            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f75447%2fssh-scp-works-but-rsync-just-constantly-says-no%23new-answer', 'question_page');

            );

            Post as a guest






























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            6
            down vote



            accepted










            Yes, of course you have to:



            rsync -e 'ssh -p 222' ...


            or:



            RSYNC_RSH='ssh -p 222' rsync ...


            Alternatively, you can specify in ~/.ssh/config that ssh connections to that host are to be on port 222 by default:



            Host that-host
            Port 222





            share|improve this answer




















            • yes that works perfectly thank you
              – MacLovin
              May 11 '13 at 18:31














            up vote
            6
            down vote



            accepted










            Yes, of course you have to:



            rsync -e 'ssh -p 222' ...


            or:



            RSYNC_RSH='ssh -p 222' rsync ...


            Alternatively, you can specify in ~/.ssh/config that ssh connections to that host are to be on port 222 by default:



            Host that-host
            Port 222





            share|improve this answer




















            • yes that works perfectly thank you
              – MacLovin
              May 11 '13 at 18:31












            up vote
            6
            down vote



            accepted







            up vote
            6
            down vote



            accepted






            Yes, of course you have to:



            rsync -e 'ssh -p 222' ...


            or:



            RSYNC_RSH='ssh -p 222' rsync ...


            Alternatively, you can specify in ~/.ssh/config that ssh connections to that host are to be on port 222 by default:



            Host that-host
            Port 222





            share|improve this answer












            Yes, of course you have to:



            rsync -e 'ssh -p 222' ...


            or:



            RSYNC_RSH='ssh -p 222' rsync ...


            Alternatively, you can specify in ~/.ssh/config that ssh connections to that host are to be on port 222 by default:



            Host that-host
            Port 222






            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered May 11 '13 at 17:45









            Stéphane Chazelas

            291k54542882




            291k54542882











            • yes that works perfectly thank you
              – MacLovin
              May 11 '13 at 18:31
















            • yes that works perfectly thank you
              – MacLovin
              May 11 '13 at 18:31















            yes that works perfectly thank you
            – MacLovin
            May 11 '13 at 18:31




            yes that works perfectly thank you
            – MacLovin
            May 11 '13 at 18:31












            up vote
            0
            down vote













            A very late answer, but one that may help others...



            rsync runs in one of two modes.




            1. You can run it across ssh, and the local rsync process will start an rsync process on the remote system to act as its server, with ssh providing the encrypted transport between the two systems. This mode is indicated by a single colon between the remote host and the remote path:



              rsync /path/to/local/ remote:/path/to/remote



            2. You can run it as a daemon, and the local rsync process will connect directly to an already-running server rsync process. There is no encryption (or ssh) offered with this scenario. This mode is indicated by a double colon between the remote host and the remote path:



              rsync /path/to/local remote::/path/to/remote


            You do not need to install an ssh server and an rsync daemon. Either one or the other is quite sufficient.



            For a secure LAN, or where the file contents are public, the rsync daemon may be more suitable as it does not require users to be able to log on to the remote system. The ssh approach is better for insecure or untrusted networks (i.e. the Internet) but it does require either very careful set up or the ability for users to be able to log on to the remote system.



            In your situation, where you want to be able to connect only over ssh, there is no point configuring or running an rsync daemon.






            share|improve this answer
























              up vote
              0
              down vote













              A very late answer, but one that may help others...



              rsync runs in one of two modes.




              1. You can run it across ssh, and the local rsync process will start an rsync process on the remote system to act as its server, with ssh providing the encrypted transport between the two systems. This mode is indicated by a single colon between the remote host and the remote path:



                rsync /path/to/local/ remote:/path/to/remote



              2. You can run it as a daemon, and the local rsync process will connect directly to an already-running server rsync process. There is no encryption (or ssh) offered with this scenario. This mode is indicated by a double colon between the remote host and the remote path:



                rsync /path/to/local remote::/path/to/remote


              You do not need to install an ssh server and an rsync daemon. Either one or the other is quite sufficient.



              For a secure LAN, or where the file contents are public, the rsync daemon may be more suitable as it does not require users to be able to log on to the remote system. The ssh approach is better for insecure or untrusted networks (i.e. the Internet) but it does require either very careful set up or the ability for users to be able to log on to the remote system.



              In your situation, where you want to be able to connect only over ssh, there is no point configuring or running an rsync daemon.






              share|improve this answer






















                up vote
                0
                down vote










                up vote
                0
                down vote









                A very late answer, but one that may help others...



                rsync runs in one of two modes.




                1. You can run it across ssh, and the local rsync process will start an rsync process on the remote system to act as its server, with ssh providing the encrypted transport between the two systems. This mode is indicated by a single colon between the remote host and the remote path:



                  rsync /path/to/local/ remote:/path/to/remote



                2. You can run it as a daemon, and the local rsync process will connect directly to an already-running server rsync process. There is no encryption (or ssh) offered with this scenario. This mode is indicated by a double colon between the remote host and the remote path:



                  rsync /path/to/local remote::/path/to/remote


                You do not need to install an ssh server and an rsync daemon. Either one or the other is quite sufficient.



                For a secure LAN, or where the file contents are public, the rsync daemon may be more suitable as it does not require users to be able to log on to the remote system. The ssh approach is better for insecure or untrusted networks (i.e. the Internet) but it does require either very careful set up or the ability for users to be able to log on to the remote system.



                In your situation, where you want to be able to connect only over ssh, there is no point configuring or running an rsync daemon.






                share|improve this answer












                A very late answer, but one that may help others...



                rsync runs in one of two modes.




                1. You can run it across ssh, and the local rsync process will start an rsync process on the remote system to act as its server, with ssh providing the encrypted transport between the two systems. This mode is indicated by a single colon between the remote host and the remote path:



                  rsync /path/to/local/ remote:/path/to/remote



                2. You can run it as a daemon, and the local rsync process will connect directly to an already-running server rsync process. There is no encryption (or ssh) offered with this scenario. This mode is indicated by a double colon between the remote host and the remote path:



                  rsync /path/to/local remote::/path/to/remote


                You do not need to install an ssh server and an rsync daemon. Either one or the other is quite sufficient.



                For a secure LAN, or where the file contents are public, the rsync daemon may be more suitable as it does not require users to be able to log on to the remote system. The ssh approach is better for insecure or untrusted networks (i.e. the Internet) but it does require either very careful set up or the ability for users to be able to log on to the remote system.



                In your situation, where you want to be able to connect only over ssh, there is no point configuring or running an rsync daemon.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 14 mins ago









                roaima

                41.6k548113




                41.6k548113



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f75447%2fssh-scp-works-but-rsync-just-constantly-says-no%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay