rsync from computer to OpenMediaVault server ask for password!

  • Hello,


    I tried rsync and it's working.
    But I have a big problem: it's asking for password.


    I tried over ssh, same way.
    I tried to add my public key in OMV, root session etc.: no way, it's asking again for password.


    Bash
    rsync -e ssh -aHtzrogpEAX /etc/sysctl.conf  root@ntx-010b:/srv/dev-disk-by-label-Donnees/Sauvegardes/RTX-050C/etc/
    root@ntx-010b's password:


    I need to make some backups but how can use rsync without using password?
    I'm using Linux, so, I have not putty.

  • ssh has to come after all the rsync parameters are done...


    Ex:
    rsync -<parameters> ssh <source> root@<dest-host>:<target>


    You did made a ssh-key on sourcehost and copied it to /ssh/authorized_keys on destination-host?


    HTH

    --
    Get a Rose Tattoo...


    HP t5740 with Expansion and USB3, Inateck Case w/ 3TB WD-Green
    OMV 5.5.23-1 Usul i386|4.19.0-9-686-pae

  • Yes, of course.
    With ssh-copy-id -i.
    I use an RSA with password.
    It's maybe for that.



    I will try with a new key, without password:

    After this, I add the private key and the public key in OMV SSH Certificate Menu.
    Without password, I can add it without error message (I couldn't add a certificate maked with a password).


    I add the public key to the user judibet in OMV with ssh-keygen -e -f .ssh/jvlinux.pub



    As you can see, the keys are present in authorized key but I need to connect with password...


    With ssh-agent, I can connect me without password for all SSH certificates:

    But ssh-agent is not a solution because I need to launch it everytimes and I need ton makes rsyncs without passwords asking.


    Do you have an idea of what I have to do?

  • If you're using rsync in the omv interface with ssh transport this is non-interactive so you have too use pub key Authentication without passphrase. The password field there is to use with an rsync server using modules.


    Hello,


    As you can see, I tried without password.
    It's working from OMV but not from my computer to OMV.
    OMV don't take into account the authorized_keys?


    Envoyé de mon SM-G935F en utilisant Tapatalk

  • Hello,


    I add the public keys (RSA RFC4716) in GUI per users before.
    As this topic.


    No way (with root or user):

    Bash
    judibet@RTX-050C:~$ rsync -e ssh -i .ssh/jvlinux.pub -aHtzrogpEAX /etc/group judibet@ntx-010b:/srv/dev-disk-by-label-Donnees/Sauvegardes/RTX-050C/etc/
    judibet@ntx-010b's password: 
    
    
    judibet@RTX-050C:~$ rsync -aHtzrogpEAX /etc/group judibet@ntx-010b:/srv/dev-disk-by-label-Donnees/Sauvegardes/RTX-050C/etc/
    judibet@ntx-010b's password:
  • Hello,


    Same with private key:

    Bash
    judibet@RTX-050C:~$ rsync -e ssh -i .ssh/jvlinux -aHtzrogpEAX /etc/sysctl.conf  judibet@ntx-010b:/srv/dev-disk-by-label-Donnees/Sauvegardes/RTX-050C/etc/
    judibet@ntx-010b's password:
  • Bash
    root@RTX-050C:~# rsync -e ssh -v -i .ssh/jvlinux -aHtzrogpEAX /etc/sysctl.conf root@ntx-010b:/srv/dev-disk-by-label-Donnees/Sauvegardes/RTX-050C/etc/
    root@ntx-010b's password: 
    sending incremental file list
    <f+++++++++ jvlinux
    
    
    sent 1,408 bytes  received 35 bytes  222.00 bytes/sec
    total size is 3,776  speedup is 2.62
    root@RTX-050C:~#

    I have nothing for the key :(.

  • You don't have a key on your local system?

    Of course, I have the keys on my local system.
    That why it's working from OMV to my computer ;-).
    I have the keys in OMV to but impossible to do that from my computer to OMV without password asking :(.


    does the target has public key authentication enabled ?

    Hello, you check this, please?

  • Ok, let me summarize for my understanding:

    • You have the keys on both systems
    • The public key is on both systems in the authorized_keys of the destination account
    • The public key is stored in the right format in the authorized keys
    • The private key is rw for the user who starts the ssh/rsync. And only for this user (mask 600)

    And it still asks you for a pw. Can you try to connect with rsync and -v to get a debug output? Should help to find the problem.

  • Forgotten to add:


    Remember you use .ssh/<keyname> for the key in your rsync. Please try with full path to the key (e.g. /home/user/.ssh/keyname) instead.

    Bash
    root@RTX-050C:~# rsync -v -e ssh -v -i /root/.ssh/jvlinux -aHtzrogpEAX /etc/sysctl.conf root@ntx-010b:/srv/dev-disk-by-label-Donnees/Sauvegardes/RTX-050C/etc/
    opening connection using: ssh -l root ntx-010b rsync --server -vvlHogDtpAXrze.iLsfx "--log-format=%i" . /srv/dev-disk-by-label-Donnees/Sauvegardes/RTX-050C/etc/  (10 args)
    root@ntx-010b's password:


    How about posting here both sshd_config files for both servers please


    cat /etc/ssh/sshd_config

    I have that (OMV):

    And that (computer):

Jetzt mitmachen!

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