Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

rsync to QNAP

Discussion in 'Data Protection' started by miyo360, Nov 14, 2017.

  1. miyo360

    miyo360 Member

    Joined:
    Nov 14, 2017
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    United Kingdom
    cPanel Access Level:
    Root Administrator
    Hi,

    I am struggling with rsync backup to a remote QNAP nas.

    I have the QNAP setup as per the instructions here: How to Set up Remote Replication on QNAP NAS?

    I have done steps A, B, D and E, which are relevant to my setup. The port is 873. I have setup a port forwarding rule on my firewall, for this port, to the QNAP.

    I have tested successfully from a Mac using terminal inside my network and also from outside my network (proving the firewall setup is working). When testing both, I did not have to specify the port as 873 - it just worked.

    However, when I try to validate the backup job from WHM, specifying the custom port 873 (rather than default 22), I get...

    Error: Validation for transport "backup to QNAP" failed: can't ssh to <my IP address>: unable to establish master SSH connection: bad password or master process exited unexpectedly at /usr/local/cpanel/Cpanel/Transport/Rsync.pm line 260.

    The password is correct.

    Any suggestions?
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,861
    Likes Received:
    89
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,

    The error clearly suggests that there is a connection issue. Are you able to connect to the QNAP directly via SSH from within the server? Can you check this..
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. miyo360

    miyo360 Member

    Joined:
    Nov 14, 2017
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    United Kingdom
    cPanel Access Level:
    Root Administrator
    Thanks. Can you provide a step-by-step guide as to how I would do this? I'm totally new to WHM/CPanel.
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,885
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Can you manually connect to the remote destination via SSH from your cPanel server?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. miyo360

    miyo360 Member

    Joined:
    Nov 14, 2017
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    United Kingdom
    cPanel Access Level:
    Root Administrator
    Thanks. I'm a complete noob with all this and come from a Windows background so have some stupid question to ask...

    Do you mean SSH from the cPanel interface to the QNAP? Or actually remote desktop into the server OS (running CentOS 7.2) then SSH from there to the QNAP?

    Either one, I am gonna need instructions. Happy to read up if you can point me to the correct resources...

    Thanks again.
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,885
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. miyo360

    miyo360 Member

    Joined:
    Nov 14, 2017
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    United Kingdom
    cPanel Access Level:
    Root Administrator
    Thanks. Ok. I have SSH access to the server.

    From there, I am testing copying a sample file (license.txt) to my remote QNAP

    Code:
    rsync -a /public_html/license.txt qnapadmin@<ipaddress>:/websitebackups
    When I do this, the ssh session (I'm using Putty from Windows) shows no activity. Eventually it times out after a few minutes. Looking at my firewall logs, I can see connection attempts from <IPAddressOfVPS>:22 but with no response from my firewall.

    Knowing that my QNAP uses a custom port for rsync, I then tried this

    Code:
    rsync -a -e "ssh -p 873" /public_html/license.txt qnapadmin@<ipaddress>:/websitebackups
    I now see a lot more communication in the firewall logs. However, the putty window immediately returns

    Code:
    ssh_exchange_identification: Connection closed by remote host
    rsync: connection unexpectedly closed (0 bytes received so far) [sender]
    rsync error: unexplained error (code 255) at io.c(605) [sender=3.0.9]
    root@kloud-server-69154 [~]# 
    If I try
    Code:
    ssh qnapadmin@<ipaddress>
    I get a timeout message
    If I try
    Code:
    ssh qnapadmin@<ipaddress> -p 873
    I get "ssh_exchange_identification: Connection closed by remote host"

    If I try the command about with verbose output I get

    Code:
    OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: /etc/ssh/ssh_config line 58: Applying options for *
    debug1: Connecting to <IPAddress> [<IPAddress>] port 873.
    debug1: Connection established.
    debug1: permanently_set_uid: 0/0
    debug1: key_load_public: No such file or directory
    debug1: identity file /root/.ssh/id_rsa type -1
    debug1: key_load_public: No such file or directory
    debug1: identity file /root/.ssh/id_rsa-cert type -1
    debug1: key_load_public: No such file or directory
    debug1: identity file /root/.ssh/id_dsa type -1
    debug1: key_load_public: No such file or directory
    debug1: identity file /root/.ssh/id_dsa-cert type -1
    debug1: key_load_public: No such file or directory
    debug1: identity file /root/.ssh/id_ecdsa type -1
    debug1: key_load_public: No such file or directory
    debug1: identity file /root/.ssh/id_ecdsa-cert type -1
    debug1: key_load_public: No such file or directory
    debug1: identity file /root/.ssh/id_ed25519 type -1
    debug1: key_load_public: No such file or directory
    debug1: identity file /root/.ssh/id_ed25519-cert type -1
    debug1: Enabling compatibility mode for protocol 2.0
    debug1: Local version string SSH-2.0-OpenSSH_7.4
    debug1: ssh_exchange_identification: @RSYNCD: 30.0
    debug1: ssh_exchange_identification: @error: protocol startup error
    ssh_exchange_identification: Connection closed by remote host

    Could it be an issue with keys?

    To be clear, my firewall is setup to forward 873 from it's public IP to the private IP. There is no NAT translation going on.

    Thanks.
     
  8. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,885
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    Could you open a support ticket using the link in my signature so we can take a closer look?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. miyo360

    miyo360 Member

    Joined:
    Nov 14, 2017
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    United Kingdom
    cPanel Access Level:
    Root Administrator
    Thanks. Done. Support case ID: 9049631
     
  10. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,749
    Likes Received:
    1,885
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    To update, here's the response from our of our Technical Analysts in the support request:

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice