rsync pull from remote server fails with "Host key verification failed."

  • I just completed a migration from OMV 5 to OMV 7 as a fresh install, and it's great.


    However, an rsync job I've been running for ages is failing, and it's been so long since I configured it, I don't know if I've somehow skipped a step and as best I can tell, OMV can't verify the Host key and I don't know where this is configured in the dashboard.


    Here is the error message when manually running from the dashboard:

    Code
    Please wait, syncing <remoteusername@example.com:/backup/source/directory/path/> to </srv/dev-disk-by-uuid-XXX/backup/destination/directory/path/>
    
    Host key verification failed.
    rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]
    rsync error: unexplained error (code 255) at io.c(232) [Receiver=3.2.7]
    ERROR: The synchronisation failed.

    Of course, the first thing I noticed is the British English misspelling of synchronization.


    The source server auth log has only the following message:

    Code
    Aug 27 05:46:42 example sshd[1234657]: Connection closed by 203.0.113.38 port 54321 [preauth]

    I fixed the problem by logging into OMV, creating a root session with sudo -i, adding .ssh/id_rsa.pub to .ssh/authorized_keys for user on the source server, then opening a session to the source server with ssh username@example.com, which included confirming the host fingerprint.


    After this, I realized there was no need to add the public key to the remote server, because the host key would be added to OMV before attempting to log in, and the host key is the only thing I needed.


    It would be nice if something, somewhere in the dashboard alerted me to this. Optionally, the source server happens to use the rare SSHFP DNS record, but probably more work to implement that than a note in the GUI.

    OMV 7.7.24-3 (Sandworm); Shuttle XPC SH67H3; Intel Core i7-3770T; 32 GB DDR3-1333 RAM; 128GB SanDisk Z400s SSD (OS); Samsung 860 EVO 1TB (primary storage); WD Red 2TB (backup and archive storage).

  • I'm having a problem which is (I believe) similar to this one, although I wasn't able to fix it using the instructions in this post, probably because I didn't process them correctly.


    What I want to do:

    Rsync (remote pull) from a Windwos 11 / WSL instance to an OMV 7.7.24-7 (Sandworm) installation.

    I'm aware this involves a few tricky things - port forwarding to WSL on the Windows side etc. - but I was able to resolve these, and make the Rsync job work on command line level. Here's the command that I can sue successfully on the OMV machine's CLI:

    Code
    rsync -av -e 'ssh -p 2022' <WSL-user>@<IP-of-Windows-machine>:/mnt/<Windows-drive-letter>/'source directory' /srv/dev-disk-by-uuid-XXXX/.../target_share/target_directory

    The Windows machine is set to forward SSH requests to its port 2022 to port 22 of the WSL virtual instance (while port 22 of the Windows machine is used for SSH requests to Windows). It took me a while to figure this out, but ... it works: After entering this command, I'm prompted for the WSL-user's password, and the Rsync job is successfully executed.


    However, I wasn't able to make it work out of the OMV web interface. I tried, increasingly erratically, quite a few configuration variants (including, of course, adding the :2022 port to the remote IP address), but kept receiving "access denied" or "host not recognized" error messages.


    Any suggestions / shared experiences / help? Thanks!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!