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

**URL:** <https://discourse.mailinabox.email/t/backup-with-rsync-does-not-work-with-port-23-on-the-destination-server/16239>\
**Category:** Maintenance\
**Created:** [January 31, 2026, 6:28pm UTC](https://discourse.mailinabox.email/t/backup-with-rsync-does-not-work-with-port-23-on-the-destination-server/16239 "2026-01-31T18:28:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fhoff](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/f/82dd89/32.png) [@fhoff](https://discourse.mailinabox.email/u/fhoff)\
**Post date:** [January 31, 2026, 6:28pm UTC](https://discourse.mailinabox.email/t/backup-with-rsync-does-not-work-with-port-23-on-the-destination-server/16239/1 "2026-01-31T18:28:22Z")

</div>

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](http://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.

---

<div class="post-metadata">

**Author:** ![KiekerJan](https://discourse.mailinabox.email/user_avatar/discourse.mailinabox.email/kiekerjan/32/2339_2.png) [@KiekerJan](https://discourse.mailinabox.email/u/KiekerJan)\
**Post date:** [January 31, 2026, 6:52pm UTC](https://discourse.mailinabox.email/t/backup-with-rsync-does-not-work-with-port-23-on-the-destination-server/16239/2 "2026-01-31T18:52:41Z")

</div>

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

> [@fhoff](#):
>
> 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:

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](http://console.hetzner.com))? Hetzner has [instructions](https://docs.hetzner.com/storage/storage-box/backup-space-ssh-keys) 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.

---

<div class="post-metadata">

**Author:** ![fhoff](https://discourse.mailinabox.email/letter_avatar_proxy/v4/letter/f/82dd89/32.png) [@fhoff](https://discourse.mailinabox.email/u/fhoff)\
**Post date:** [February 1, 2026, 4:08pm UTC](https://discourse.mailinabox.email/t/backup-with-rsync-does-not-work-with-port-23-on-the-destination-server/16239/3 "2026-02-01T16:08:35Z")

</div>

Thank you very much for your advise. By using the [instructions](https://docs.hetzner.com/storage/storage-box/backup-space-ssh-keys) from Hetzner on how to add the SSH key to the storage box it worked (I had to replace the file name by /root/.ssh/id\_rsa\_miab.pub).

Before that I used the Hetzner Managemant console to add the SSH key and it showed up in the security section of the console. This however did not allow an access without a password.

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![system](https://discourse.mailinabox.email/uploads/default/original/2X/4/4d0933d13c456b7e57f296aa6cc344525b6f0c70.png) [@system](https://discourse.mailinabox.email/u/system)\
**Post date:** [March 13, 2026, 4:09pm UTC](https://discourse.mailinabox.email/t/backup-with-rsync-does-not-work-with-port-23-on-the-destination-server/16239/4 "2026-03-13T16:09:14Z")

</div>

This topic was automatically closed 40 days after the last reply. New replies are no longer allowed.
