rsync port 22 and 873 use











up vote
0
down vote

favorite












Can someone explain when does rsync use port 22 on the remote host and when does it use port 873?



Can it be set to always port 22, since I heard it has to use port 873 if it is run as a daemon? Can someone explain in simple terms.










share|improve this question




























    up vote
    0
    down vote

    favorite












    Can someone explain when does rsync use port 22 on the remote host and when does it use port 873?



    Can it be set to always port 22, since I heard it has to use port 873 if it is run as a daemon? Can someone explain in simple terms.










    share|improve this question


























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      Can someone explain when does rsync use port 22 on the remote host and when does it use port 873?



      Can it be set to always port 22, since I heard it has to use port 873 if it is run as a daemon? Can someone explain in simple terms.










      share|improve this question















      Can someone explain when does rsync use port 22 on the remote host and when does it use port 873?



      Can it be set to always port 22, since I heard it has to use port 873 if it is run as a daemon? Can someone explain in simple terms.







      ssh rsync daemon






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 24 '17 at 17:14









      Philip Kirkbride

      2,3792778




      2,3792778










      asked Nov 24 '17 at 16:25









      Darren Bozingwa

      312




      312






















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          For context, the rsync documentation says




          There are two different ways for rsync to contact a remote system: using a remote-shell program as the
          transport (such as ssh or rsh) or contacting an rsync daemon directly via TCP. The remote-shell transport is used whenever the source or destination path contains a single colon (:) separator after a host
          specification. Contacting an rsync daemon directly happens when the source or destination path contains
          a double colon (::) separator after a host specification, OR when an rsync:// URL is specified.




          Port 22 is the SSH port; it’s used when you tell rsync to connect via SSH, with a single colon (the “remote-shell” case above). Port 873 is the rsync dæmon port; it’s used when rsync is used with a double colon or a rsync:// URL.



          Most of the time you’ll be using SSH; using the dæmon requires specific setup. If you only ever want to use port 22, all you need to do is always specify a single colon in the remote host descriptor.






          share|improve this answer





















          • will communication on port 873 be encrypted as SSH is? If not is there a possibility that this is configured to be encrypted?
            – Darren Bozingwa
            Nov 24 '17 at 16:44










          • No, communications with rsyncd on port 873 aren’t encrypted unless you use an encrypting transport (such as SSH, in which case it uses port 22). rsync deals with this transparently if you use a path containing a single colon.
            – Stephen Kitt
            Nov 27 '17 at 8:10


















          up vote
          0
          down vote













          You can use parameter -e to specify the ssh port, e.g.
          rsync -rvz -e 'ssh -p $port' ./dir user@host:/path






          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%2f406832%2frsync-port-22-and-873-use%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            3
            down vote



            accepted










            For context, the rsync documentation says




            There are two different ways for rsync to contact a remote system: using a remote-shell program as the
            transport (such as ssh or rsh) or contacting an rsync daemon directly via TCP. The remote-shell transport is used whenever the source or destination path contains a single colon (:) separator after a host
            specification. Contacting an rsync daemon directly happens when the source or destination path contains
            a double colon (::) separator after a host specification, OR when an rsync:// URL is specified.




            Port 22 is the SSH port; it’s used when you tell rsync to connect via SSH, with a single colon (the “remote-shell” case above). Port 873 is the rsync dæmon port; it’s used when rsync is used with a double colon or a rsync:// URL.



            Most of the time you’ll be using SSH; using the dæmon requires specific setup. If you only ever want to use port 22, all you need to do is always specify a single colon in the remote host descriptor.






            share|improve this answer





















            • will communication on port 873 be encrypted as SSH is? If not is there a possibility that this is configured to be encrypted?
              – Darren Bozingwa
              Nov 24 '17 at 16:44










            • No, communications with rsyncd on port 873 aren’t encrypted unless you use an encrypting transport (such as SSH, in which case it uses port 22). rsync deals with this transparently if you use a path containing a single colon.
              – Stephen Kitt
              Nov 27 '17 at 8:10















            up vote
            3
            down vote



            accepted










            For context, the rsync documentation says




            There are two different ways for rsync to contact a remote system: using a remote-shell program as the
            transport (such as ssh or rsh) or contacting an rsync daemon directly via TCP. The remote-shell transport is used whenever the source or destination path contains a single colon (:) separator after a host
            specification. Contacting an rsync daemon directly happens when the source or destination path contains
            a double colon (::) separator after a host specification, OR when an rsync:// URL is specified.




            Port 22 is the SSH port; it’s used when you tell rsync to connect via SSH, with a single colon (the “remote-shell” case above). Port 873 is the rsync dæmon port; it’s used when rsync is used with a double colon or a rsync:// URL.



            Most of the time you’ll be using SSH; using the dæmon requires specific setup. If you only ever want to use port 22, all you need to do is always specify a single colon in the remote host descriptor.






            share|improve this answer





















            • will communication on port 873 be encrypted as SSH is? If not is there a possibility that this is configured to be encrypted?
              – Darren Bozingwa
              Nov 24 '17 at 16:44










            • No, communications with rsyncd on port 873 aren’t encrypted unless you use an encrypting transport (such as SSH, in which case it uses port 22). rsync deals with this transparently if you use a path containing a single colon.
              – Stephen Kitt
              Nov 27 '17 at 8:10













            up vote
            3
            down vote



            accepted







            up vote
            3
            down vote



            accepted






            For context, the rsync documentation says




            There are two different ways for rsync to contact a remote system: using a remote-shell program as the
            transport (such as ssh or rsh) or contacting an rsync daemon directly via TCP. The remote-shell transport is used whenever the source or destination path contains a single colon (:) separator after a host
            specification. Contacting an rsync daemon directly happens when the source or destination path contains
            a double colon (::) separator after a host specification, OR when an rsync:// URL is specified.




            Port 22 is the SSH port; it’s used when you tell rsync to connect via SSH, with a single colon (the “remote-shell” case above). Port 873 is the rsync dæmon port; it’s used when rsync is used with a double colon or a rsync:// URL.



            Most of the time you’ll be using SSH; using the dæmon requires specific setup. If you only ever want to use port 22, all you need to do is always specify a single colon in the remote host descriptor.






            share|improve this answer












            For context, the rsync documentation says




            There are two different ways for rsync to contact a remote system: using a remote-shell program as the
            transport (such as ssh or rsh) or contacting an rsync daemon directly via TCP. The remote-shell transport is used whenever the source or destination path contains a single colon (:) separator after a host
            specification. Contacting an rsync daemon directly happens when the source or destination path contains
            a double colon (::) separator after a host specification, OR when an rsync:// URL is specified.




            Port 22 is the SSH port; it’s used when you tell rsync to connect via SSH, with a single colon (the “remote-shell” case above). Port 873 is the rsync dæmon port; it’s used when rsync is used with a double colon or a rsync:// URL.



            Most of the time you’ll be using SSH; using the dæmon requires specific setup. If you only ever want to use port 22, all you need to do is always specify a single colon in the remote host descriptor.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 24 '17 at 16:31









            Stephen Kitt

            160k24357432




            160k24357432












            • will communication on port 873 be encrypted as SSH is? If not is there a possibility that this is configured to be encrypted?
              – Darren Bozingwa
              Nov 24 '17 at 16:44










            • No, communications with rsyncd on port 873 aren’t encrypted unless you use an encrypting transport (such as SSH, in which case it uses port 22). rsync deals with this transparently if you use a path containing a single colon.
              – Stephen Kitt
              Nov 27 '17 at 8:10


















            • will communication on port 873 be encrypted as SSH is? If not is there a possibility that this is configured to be encrypted?
              – Darren Bozingwa
              Nov 24 '17 at 16:44










            • No, communications with rsyncd on port 873 aren’t encrypted unless you use an encrypting transport (such as SSH, in which case it uses port 22). rsync deals with this transparently if you use a path containing a single colon.
              – Stephen Kitt
              Nov 27 '17 at 8:10
















            will communication on port 873 be encrypted as SSH is? If not is there a possibility that this is configured to be encrypted?
            – Darren Bozingwa
            Nov 24 '17 at 16:44




            will communication on port 873 be encrypted as SSH is? If not is there a possibility that this is configured to be encrypted?
            – Darren Bozingwa
            Nov 24 '17 at 16:44












            No, communications with rsyncd on port 873 aren’t encrypted unless you use an encrypting transport (such as SSH, in which case it uses port 22). rsync deals with this transparently if you use a path containing a single colon.
            – Stephen Kitt
            Nov 27 '17 at 8:10




            No, communications with rsyncd on port 873 aren’t encrypted unless you use an encrypting transport (such as SSH, in which case it uses port 22). rsync deals with this transparently if you use a path containing a single colon.
            – Stephen Kitt
            Nov 27 '17 at 8:10












            up vote
            0
            down vote













            You can use parameter -e to specify the ssh port, e.g.
            rsync -rvz -e 'ssh -p $port' ./dir user@host:/path






            share|improve this answer

























              up vote
              0
              down vote













              You can use parameter -e to specify the ssh port, e.g.
              rsync -rvz -e 'ssh -p $port' ./dir user@host:/path






              share|improve this answer























                up vote
                0
                down vote










                up vote
                0
                down vote









                You can use parameter -e to specify the ssh port, e.g.
                rsync -rvz -e 'ssh -p $port' ./dir user@host:/path






                share|improve this answer












                You can use parameter -e to specify the ssh port, e.g.
                rsync -rvz -e 'ssh -p $port' ./dir user@host:/path







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 29 at 6:44









                user674158

                11




                11






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f406832%2frsync-port-22-and-873-use%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Morgemoulin

                    Scott Moir

                    Souastre