Rsync pull from dedicated server to OMV via SSH - public keys do not work

    • OMV 2.x
    • Resolved

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Rsync pull from dedicated server to OMV via SSH - public keys do not work


      I would like to pull recursively a directory each hour via SSH. I created a SSH Key in the "Certificates" section, and I added the public key to my distant server. I checked the public key by copying the private key in a file and making a ssh command with the -i argument ; I logged in successfully.

      So, I created this rsync task:

      Type: distant
      Mode: pull
      Source server: omv@
      Try: false
      Recursive: true
      Compress: false
      Archive: false
      Delete: false
      Additional options: --verbose

      When I run this, I got randomly these errors:
      opening connection using: ssh -l omv rsync --server --sender -vvtre.iLsf . /var/backups/ (and nothing after, but the button "Start" is set as active)
      ssh: Permission denied (publickey)

      I can ping my distant server from my OMV Server, and the key seems to work (when I copy and test it, my server accepts it for the omv user). So, I guess the ssh key is not taken for the rsync login. When I try the ssh -l omv rsync --server --sender -vvtre.iLsf . /var/backups/ command as root from my OMV Server, it also does not work.
      But I made the same configuration few weeks ago, and it worked without problem... So what's my mistake ? :(

      I do not have any rsync server running in my distant server, I'd like rsync to work with ssh. It seems it is possible because I made it previously.

      Thank you for your informations,


      PS: My OMV Server runs on a RaspberryPi. I don't think it matter because ssh works in command line, but maybe...
    • Hello subzero,

      The private key has no password, my distant server is a Debian. I can login to my distant server from OMV with this private key with the command line on OMV server, but I can't from the embedded rsync on OMV interface.

      But I do not have the rsync binary installed on the server I want to pull from. I do not ask "rsync://omv@" but only "omv@", and I though it can work (I made it work some weeks ago, and I changed nothing on my distant server).

      What do you mean by "having the rsync binary on the distant server" ?

      Thank you for your help

    • Sorry i though this was fully implemented but is not ready yet, apparently. @votdev can give more insight when he is available.

      If you want to use it right now in the remote server (source) field put

      -e 'ssh omv@ -i /var/lib/openmediavault/ssh/keys/openmediavault-61a5d5a6-cfed-44a7-857a-3f5164a7b4ef the numbers after "openmediavault-" are a uuid, you can go there to that location and change that for yours.

      Maybe to add a pull down selection of the ssh key from the certificates section and a checkbox for ssh as transport. If i recall the single : is implicit for ssh
      New wiki
      chat support at #openmediavault@freenode IRC | Spanish & English | GMT+10 broadcast channel
      openmediavault discord server
    • Ok, thanks a lot for your reactivity and the command !

      I tried your command, but when I run it, it just lists my local directory:

      Please wait, syncing <-e 'ssh omv@ -i /var/lib/openmediavault/ssh/keys/openmediavault-61a5d5a6-cfed-44a7-857a-3f5164a7b4ef'> to </media/729e56c8-5772-41b7-9747-122ec553acbb/backups> ...

      sending incremental file list
      delta-transmission disabled for local transfer or --whole-file
      drwxrwsrwx 4096 2015/09/19 17:08:59 .
      drwxr-sr-x 4096 2015/06/26 16:06:26

      total: matches=0 hash_hits=0 false_alarms=0 data=0

      sent 3421 bytes received 25 bytes 6892.00 bytes/sec
      total size is 37817628347 speedup is 10974355.30

      The file is in my OMV shared folder, and not in the distant server... To which command is "-e 'ssh omv@ -i /var/lib/openmediavault/ssh/keys/openmediavault-61a5d5a6-cfed-44a7-857a-3f5164a7b4ef'" concatenated ? Because I don't get the problem globally and I don't understand the whole command I'm executing. I recall that I'd like OMV to PULL a remote directory, and it seems that this command makes the distant server to pull omv files.

      Moreover, are the checkboxes under the server address (like "Recursive" or "Archive"...) used ?
    • Hello,
      thanks for your solution. It does not work. Crap! Can you help me? I did it like you showed.

      It is the error:

      Source Code

      1. Unexpected remote arg: root@x.x.x.x:/var
      2. rsync error: syntax or usage error (code 1) at main.c(1232) [sender=3.0.9]
      3. /usr/share/openmediavault/scripts/helper-functions: Zeile 793: kill: (25349) - Kein passender Prozess gefunden

      Danke für eure Hilfe!
    • Hello,

      thanks for Help =)

      Now i have an new Error:

      Source Code

      1. Please wait, syncing <root@x.x.x.x:/> to </media/d6a60967-1af2-4c23-91df-467865fcd31c/Webserver_1/> ...\n
      2. es received so far) [Receiver]
      3. rsync error: unexplained error (code 255) at io.c(605) [Receiver=3.0.9]
      4. /usr/share/openmediavault/scripts/helper-functions: Zeile 793: kill: (6265) - Kein passender Prozess gefunden