Rsync - Connection refused on different port than 22

  • Can you try on your OMV server
    nc -nvz <web server ip> 22445 (if you would like to use the host name use nc -vz <hostname> 22445
    ?


    nc is used to check if there is a listener on the remote site (like e.g. a ssh deamon)


    Not sure if nc is installed by default, if not use apt to install it.

  • With ssh? You try to use rsync over ssh which means the ssh connection needs to be established first.


    Can you post the sshd_conf from the web server?


    Is there a line Port 22445 to establish a listener on the port? (multiple entries are allowed but didn't test is by myself)

  • No, not this one.


    The /etc/ssh/ssd_config on the web server (the destination) must conatin something like:



    Just added the line 6 (Port 22455) on my own server for a test and could connect with ssh -p 22445 <my user><at><my server>.

  • Here it is,

    "Given enough eyeballs, all bugs are shallow"
    ESR.

  • I've compared.
    You're saying that i should open second port for ssh connections?


    That last line has no matter. Exists for better security. I can delete that, under XXXX is my user name.

    "Given enough eyeballs, all bugs are shallow"
    ESR.

  • Don't think you need a second port. But for a try to figure out where is the problem it might help. Same for the user.


    Until you have a stable connection I would remove the limits and then activate them one by one again. And test with ssh -p 22445 -vvv user<at>server to see where the ssh hangs.

  • I can copy, synchronize files via terminal and rsync command without any problems:

    Code
    rsync -avz -e "ssh -p 22445" me@10.0.0.3:/var/www/ /tmp/test/

    I can not do that via OMV's interface and rsync task. Apparently there's a bug with SSH Port setting, at least in this particular case.


    I found simple workaround. I've opened rsync task for edit and in Extra options field added:
    -e "ssh -p 22445"
    That line resolved my problem.


    Anyway thanks subzero79 and chris789.
    Respect !


    "Given enough eyeballs, all bugs are shallow"
    ESR.

  • I don't mind:

    "Given enough eyeballs, all bugs are shallow"
    ESR.

  • Something I've seen in the script: Between --rsh and "ssh -p ..." is a missing '='. If you add the -e before the "ssh -p ..." you get the same as with ---rsh=ssh -p ... . Think the missing '=' is the problem.


    Cannot test how to get the correct syntax in the script because my OMV is 2.x and I use rsync as part of a bigger (self scripted) backup solution and not the plugin.

    • Offizieller Beitrag

    Something I've seen in the script: Between --rsh and "ssh -p ..." is a missing '='. If you add the -e before the "ssh -p ..." you get the same as with ---rsh=ssh -p ... . Think the missing '=' is the problem.


    The manual indicates as you point, but i have a similar pull setup using a remote public server also using a different port and it works as expected using --rsh "ssh -p 2000" . I have no idea why is defaulting to port 22 in this case

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!