The host identification of my borg host has changed and I cannot backup anymore

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • Nextcloud AIO
  • Operating system and version (e.g., Ubuntu 24.04):
    • Debian Trixie
  • Web server and version (e.g, Apache 2.4.25):
    • Nextcloud AIO
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • nginx
  • PHP version (e.g, 8.3):
    • Nextcloud AIO
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • Today
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • AIO
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

I have a borg repository accessible through SSH and I needed to move it from one server to another one. Now backup does not work anymore. I see the following error:

2025-12-17T10:47:29.616871293Z SSH command line: [‘ssh’, ‘-o’, ‘StrictHostKeyChecking=accept-new’, ‘-i’, ‘/nextcloud_aio_volumes/nextcloud_aio_mastercontainer/data/id_borg’, ‘-p’, ‘8022’, ‘backup@b68.krzm.de’, ‘borg’, ‘serve’, ‘–debug’]
2025-12-17T10:47:29.832280829Z Remote: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
2025-12-17T10:47:29.832353736Z Remote: @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
2025-12-17T10:47:29.832359497Z Remote: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
2025-12-17T10:47:29.832362943Z Remote: IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
2025-12-17T10:47:29.832366059Z Remote: Someone could be eavesdropping on you right now (man-in-the-middle attack)!
2025-12-17T10:47:29.832369244Z Remote: It is also possible that a host key has just been changed.
2025-12-17T10:47:29.832372530Z Remote: The fingerprint for the ED25519 key sent by the remote host is
2025-12-17T10:47:29.832376237Z Remote: SHA256:RRRc0lx+hKtgDK2Rw8rvtC1OGKPnrNSlkabCqqSIh0o.
2025-12-17T10:47:29.832379704Z Remote: Please contact your system administrator.
2025-12-17T10:47:29.832382950Z Remote: Add correct host key in /root/.ssh/known_hosts to get rid of this message.
2025-12-17T10:47:29.832447191Z Remote: Offending ED25519 key in /root/.ssh/known_hosts:3
2025-12-17T10:47:29.832451028Z Remote: Host key for [XXX]:8022 has changed and you have requested strict checking.
2025-12-17T10:47:29.832454184Z Remote: Host key verification failed.

My question: How do I fix that in the borgbackup container of AIO? I have no way of running the container such that I could exec into it and change the known_hosts file.

Steps to replicate it (hint: details matter!):

  1. Move an existing borg repository from one host to another

  2. Create a new backup

Log entries

Nextcloud

See above

1 Like

Hi, you could reset the backup location via the AIO interface (there is now a button to do this) and then try to re-do the initial bacup setup

Thanks for the suggestion, but wouldn’t I lose the old backups then?

I’ve tried that - did not change the outcome. But thanks anyway!

No, it should be able to catch up on the existing backups if you dont delete the target backup repository.

Okay, I’ve changed the host id of the new server of the one the old server had. Now SSH access works again, but I’ve run into a different problem now:

2025-12-17T11:35:44.384288776Z Did not find borg.config file in the mastercontainer volume.
2025-12-17T11:35:44.385797641Z Cannot create a backup as this is wrong.

I have no idea where this is coming from.

Any idea what this means?

Hm… simply run touch /var/lib/docker/volumes/nextcloud_aio_mastercontainer/_data/data/borg.config and try again?

1 Like

Wow. That seems to have done the trick. Thanks very much!

A backup seems to be running now. Let’s hope for the best…

I have the same issue and cannot set the remote locations key to the one it had before.

Any idea how to update the borgbackup stored key?

I tried to SSH from the nextcloud server into the remote location.

I said there was a new key and asked me to store it. It is stored ok as I could verify.

Yet Borg seems to have it stored somewhere unknown. There is no borg.config file in /var/lib/docker/volumes/nextcloud_aio_mastercontainer/_data/data/ as I never made a successful backup before

I keep getting the same error:

2026-01-04T17:26:48.736377078Z Your public ssh key for borgbackup is: ssh-ed25519 AAAAC... root@nextcloud-aio-borgbackup
2026-01-04T17:26:49.593769708Z Remote: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
2026-01-04T17:26:49.593803356Z Remote: @    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
2026-01-04T17:26:49.593806948Z Remote: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
2026-01-04T17:26:49.593809319Z Remote: IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
2026-01-04T17:26:49.593811708Z Remote: Someone could be eavesdropping on you right now (man-in-the-middle attack)!
2026-01-04T17:26:49.593813930Z Remote: It is also possible that a host key has just been changed.
2026-01-04T17:26:49.593816467Z Remote: The fingerprint for the ED25519 key sent by the remote host is
2026-01-04T17:26:49.593818615Z Remote: SHA256:bzCAy2....
2026-01-04T17:26:49.593820930Z Remote: Please contact your system administrator.
2026-01-04T17:26:49.593823041Z Remote: Add correct host key in /root/.ssh/known_hosts to get rid of this message.
2026-01-04T17:26:49.593825337Z Remote: Offending ECDSA key in /root/.ssh/known_hosts:4
2026-01-04T17:26:49.593827393Z Remote: Host key for 192.168.178.31 has changed and you have requested strict checking.
2026-01-04T17:26:49.593829633Z Remote: Host key verification failed.
2026-01-04T17:26:49.597627994Z Connection closed by remote host. Is borg working on the server?

The only way i could manage to get around this is to assign a new IP adress and use the IP adress in the remote location rather than the host name.