Backup with rsync does not work with port 23 on the destination server

I would like to set up an automatic backup for my Mail-in-a-Box using rsync to a storage box from Hetzner in the domain your-storagebox.de.

When I enter ‘u???.your-storagebox.de:23’ under Hostname and ‘/home’ under Path on the ‘Backup Status’ page in the administrative control panel, copy the public SSH key and enter it as the SSH key at Hetzner, I only get the response:

“Connection to rsync host failed: Unknown error. Please check running “management/backup.py --verify” from mailinabox sources to debug the issue.”

Hetzner only accepts access to the storage box via port 23.

I tested rsync from the command line and was able to successfully transfer a file to the storage box using the following command:

‘rsync -avz -e ’ssh -p23 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" --progress /home/???/ test/test.txt u???@u???.your-storagebox.de:/home’ (The question marks stand for characters that I want to hide)

My Mail-in-a-Box runs on an Ubuntu operating system, version 22.04.5 LTS.

I wonder if specifying port 23 with a ‘:23’ after the host name is really the right way to do it, because rsync would not accept it if such a specification were appended after the host name of the target server. Instead, the specification ‘-p23’ must be added to the parameter for the remote shell.

Unfortunately, I cannot find any further information about what exactly caused the error. When I enter ‘management/backup.py --verify’ on the server’s command line, I only get the message

‘No such file or directory’.

I could not find a directory called ‘management’ or ‘mailinabox’ on the server either. But perhaps I just didn’t search properly.

You might be able to obtain more details on the failure by using sudo journalctl -u mailinabox

I wonder what exactly you mean with this. Did you update the .ssh/authorized_keys at the Hetzner storagebox? Or did you add the SSH key to the Hetzner management console (console.hetzner.com)? Hetzner has instructions on how to add the SSH key to the storage box.

I use the storagebox as well, and appending :23 to the Hostname is the way I use this.

There should be a folder mailinabox on the server. It can be on /root/mailinabox or on your home folder /home/<username>/mailinabox. Otherwise, try locate mailinabox | grep management to find it.