rsync to QNAP
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 : 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?
-
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.. 0 -
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..
Thanks. Can you provide a step-by-step guide as to how I would do this? I'm totally new to WHM/CPanel.0 -
Hello, Can you manually connect to the remote destination via SSH from your cPanel server? Thank you. 0 -
Hello, Can you manually connect to the remote destination via SSH from your cPanel server? Thank you.
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.0 -
Hello, You will need to check the SSH connection from the cPanel server's command line to the remote backup server: How to Access the Command Line - cPanel Knowledge Base - cPanel Documentation Thank you. 0 -
Thanks. Ok. I have SSH access to the server. From there, I am testing copying a sample file (license.txt) to my remote QNAP rsync -a /public_html/license.txt qnapadmin@:/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 :22 but with no response from my firewall. Knowing that my QNAP uses a custom port for rsync, I then tried thisrsync -a -e "ssh -p 873" /public_html/license.txt qnapadmin@:/websitebackups
I now see a lot more communication in the firewall logs. However, the putty window immediately returnsssh_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 tryssh qnapadmin@
I get a timeout message If I tryssh qnapadmin@ -p 873
I get "ssh_exchange_identification: Connection closed by remote host" If I try the command about with verbose output I getOpenSSH_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 [] 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.0 -
Hello, Could you open a support ticket using the link in my signature so we can take a closer look? Thank you. 0 -
Thanks. Done. Support case ID: 9049631 0 -
Hello, To update, here's the response from our of our Technical Analysts in the support request: The cPanel rsync backup system authenticates using SSH so in order for it to be able to connect you will need to ensure that the backup server has SSH authentication enabled and the ssh port is open for connections. Once this is done, you will need to replace the port number in your configuration with the port number being used by the SSH daemon. I would recommend reaching out to Qnap's support for assistance making any changes to the backup server.
Thank you.0 -
Have hit this same issue. Would be good if the solution / cause was posted here also. 0
Please sign in to leave a comment.
Comments
10 comments