Rsync not working and I am all out of ideas

  • so i have tried a little bit of everything.


    So on the OMV server I sshed over to my ubuntu box. I also from my ubuntu box sshed over to the OMV server.


    When i run the rsync from the OMV gui i get the following.


    Please wait, syncing <harold@192.168.211.45:/home/harold/test> to </srv/dev-disk-by-id-md-name-openmediavault-USB4bay/idrive> ...


    OpenSSH_6.7p1 Debian-5+deb8u3, OpenSSL 1.0.1t 3 May 2016
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: /etc/ssh/ssh_config line 19: Applying options for *
    debug1: Connecting to 192.168.211.45 [192.168.211.45] port 22.
    debug1: Connection established.
    debug1: permanently_set_uid: 0/0
    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_6.7p1 Debian-5+deb8u3
    debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8
    debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.8 pat OpenSSH_6.6.1* compat 0x04000000
    debug1: SSH2_MSG_KEXINIT sent
    debug1: SSH2_MSG_KEXINIT received
    debug1: kex: server->client aes128-ctr umac-64-etm@openssh.com none
    debug1: kex: client->server aes128-ctr umac-64-etm@openssh.com none
    debug1: sending SSH2_MSG_KEX_ECDH_INIT
    debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
    debug1: Server host key: ECDSA 27:0c:78:82:dd:4e:f9:9c:83:35:42:cb:87:bb:d8:95
    debug1: Host '192.168.211.45' is known and matches the ECDSA host key.
    debug1: Found key in /root/.ssh/known_hosts:1
    debug1: SSH2_MSG_NEWKEYS sent
    debug1: expecting SSH2_MSG_NEWKEYS
    debug1: SSH2_MSG_NEWKEYS received
    debug1: SSH2_MSG_SERVICE_REQUEST sent
    debug1: SSH2_MSG_SERVICE_ACCEPT received
    debug1: Authentications that can continue: publickey,password
    debug1: Next authentication method: publickey
    debug1: Offering RSA public key: /root/.ssh/id_rsa
    debug1: Authentications that can continue: publickey,password
    debug1: Trying private key: /root/.ssh/id_dsa
    debug1: Trying private key: /root/.ssh/id_ecdsa
    debug1: Trying private key: /root/.ssh/id_ed25519
    debug1: Next authentication method: password
    debug1: read_passphrase: can't open /dev/tty: No such device or address
    debug1: Authentications that can continue: publickey,password
    Permission denied, please try again.
    debug1: read_passphrase: can't open /dev/tty: No such device or address
    debug1: Authentications that can continue: publickey,password
    Permission denied, please try again.
    debug1: read_passphrase: can't open /dev/tty: No such device or address
    debug1: Authentications that can continue: publickey,password
    debug1: No more authentication methods to try.
    Permission denied (publickey,password).
    rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
    rsync error: unexplained error (code 255) at io.c(226) [Receiver=3.1.1]



    I am logged in as Admin on the OMV GUI and the ubuntu box the SSH account for file manager is Harold.


    I am all out of ideas if you guys could point me in the right direction it would really help.

    • Offizieller Beitrag

    There's another way to do what you're doing, from the OMV end of it.


    First, install the "Remote Mount" Plugin. (Using the Remote Mount plugin bypasses the need to use an Rsync server on either end.)


    Second, using the Remote Mount Plugin;
    Mount the network share 192.168.211.45:/home/harold/test . You'll need a user name and password, with access to the share. The user will need a minimum of read access, to pull from the above share. (I'm guessing that the user is harold.)


    If you want to push from OMV to the above share, the user will need write access. That means the user "harold" will need to have write access to all folders in the path, from home all the way down to test. Check permissions on all folders in the path.

    At this point, if the Remote Mount is successful, you'll see the remote share in File Systems. It will appear to be a local drive.


    Lastly set up a Local Rsync job with the source being the remote share (above) and with the destination being a shared folder on your OMV server.


    Remember, with Remote Mount, the remote share is local. The Rsync job is local.

  • Hi,
    I'm following up this thread as I have the same kind of problem.
    I have a remote server (shared server) that I can only access through FTP or SSH.
    I want to pull data from that server and write them on my OMV machine.
    When I loggin with a terminal on my OMV machine as root, and then launch the following command, everything is fine, the sync is done.

    Code
    rsync -av --include=*.zip --exclude=* MYUSER@MYSERVER.com:/home/mypath/backupWP/ /srv/dev-disk-by-label-WebBackup/mylocalpath/


    But when I try to launch the same command using the Rsync task manager through the web interface, I get this:

    So I tried the above solution with the Remote Mount plugin, but as I can't define a SMB or a NFS share, it doesn't help me. Also I had a look at curlftpfs but as the only things I found on this forum about it was a thread saying the guys didn't make it to work, I'm a bit shy to try myself.


    For my case, as it's working fine with the command line, is there a way to make it work with the cron task? I didn't find any thread giving a clear solution, as most of the time the problem described is more complicated than mine.


    Thanks for your lights.

  • Just want to share how I make it works at the end.


    The solution was simply to share ssh keys between my distant server and my omv machine.


    For those who doesn't know what is about, it's finally (when you now the solution) dead simple. Here is the tutorial I have use https://www.digitalocean.com/c…ication-on-a-linux-server .


    First loggin to your OMV machine through SSH or run a terminal on it.
    Depending on what you have already configure in your OMV installation, you might already have generated a pair of ssh keys. You can check here, for the root user:

    Code
    ls -la /root/.ssh/


    If it exists, you will find "id_rsa" and "id_rsa.pub" files. That means you already have a pair of ssh keys for your root user.


    Then you need to let your distant server knows about your OMV machine.
    On your OMV machine, using the following command will allow you to copy your key to your distant server. For more details check the tutorial linked above.

    Code
    ssh-copy-id username@remote_host


    That's it!
    Once done, I was able to run Rsync job from the web interface in OMV.

    • Offizieller Beitrag

    Well, umm,, there you go! That was a hard one. Glad I could help! :)
    _____________________________________________________


    For automating command line tasks in the GUI:
    I copy and paste command lines in as shown below. As far as I know, if it can be done in a single terminal session, with a single command line, cron in the GUI will do it.
    Using the following you can automate most tasks and, if you fill in E-mail details under System, Notification, OMV will e-mail you the output.



Jetzt mitmachen!

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