Ssh key changed for sftp storage

I have changed the machine so the ssh key is now different. I removed the storage and tried to add it again but it won’t let me due to the ssh key mismatch.

How do I tell it to accept the new key in the webui?

Delete the known_hosts file (or old host ID from that file).

Edit. Ah wait. Are you saying hostid changed or you generated a new key for authentication?

host id (key fingerprint) changed.

Yeah, delete known_hosts file.

1 Like

Where is the file? It’s not in ~/.ssh/

Somewhere under ~/.duplicacy_web/repositories

Or if you using my container — under /caches

I’m afraid neither directory exists. I’m using your container:

/ # ls -la
total 20
drwxr-xr-x    1 root     root           198 Jan 17 16:46 .
drwxr-xr-x    1 root     root           198 Jan 17 16:46 ..
-rwxr-xr-x    1 root     root             0 Jan 17 16:46 .dockerenv
drwxrwxrwx    1 duplicac duplicac      4096 Jan 15 16:25 backuproot
drwxr-xr-x    1 root     root           870 Sep 23 04:11 bin
drwxrwxrwx    1 duplicac duplicac        23 Jan  9 23:08 cache
drwxrwxrwx    1 duplicac duplicac       220 Jan 17 17:17 config
drwxr-xr-x    5 root     root           340 Jan 17 16:46 dev
drwxr-xr-x    1 root     root           776 Jan 17 16:46 etc
drwxr-xr-x    1 root     root            18 Jan 17 16:46 home
drwxr-xr-x    1 root     root           282 Aug  7 14:09 lib
drwxrwxrwx    1 duplicac duplicac     12288 Jan 17 17:17 logs
drwxr-xr-x    1 root     root            28 Aug  7 14:09 media
drwxr-xr-x    1 root     root             0 Aug  7 14:09 mnt
drwxr-xr-x    1 root     root             0 Aug  7 14:09 opt
dr-xr-xr-x 1065 root     root             0 Jan 17 16:46 proc
drwxrwxrwt    7 duplicac duplicac       140 Jan 12 15:40 remotes
drwx------    1 root     root            24 Jan 17 16:46 root
drwxr-xr-x    1 root     root             0 Aug  7 14:09 run
drwxr-xr-x    1 root     root           804 Sep 23 04:11 sbin
drwxr-xr-x    1 root     root             0 Aug  7 14:09 srv
dr-xr-xr-x   13 root     root             0 Jan 17 16:46 sys
drwxrwxrwt    1 root     root             0 Aug  7 14:09 tmp
drwxr-xr-x    1 root     root            54 Sep 23 04:11 usr
drwxr-xr-x    1 root     root            86 Aug  7 14:09 var
/ # ls -la cache
total 0
drwxrwxrwx    1 duplicac duplicac        23 Jan  9 23:08 .
drwxr-xr-x    1 root     root           198 Jan 17 16:46 ..
drwx------    1 duplicac duplicac       193 Jan 17 17:16 localhost

find /cache -name known_hosts

okay so there’s tons of known_hosts under /cache/localhost/[n]/.duplicacy/known_hosts

how do I know which ones to delete?

Delete all of them :slight_smile:

find /cache -name known_hosts -delete

Edit. Or you can look into each file and delete the lines corresponding to the hostname of your server. But why bother.

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