zfs.autoReplication SSH setup

I’m trying to enable zfs.autoReplication and am having issues connecting to the remote. I have set the host, identifyFilePath and username.

I can ssh into the remote using ssh -i <identityFilePath> <user>@<host> using all the same parameters as I set in my config.

But when the service runs, it fails with:

Error: error encountered while listing filesystems of 'tank': b'No ED25519 host key is known for <host> and you have requested strict checking.\r\nHost key verification failed.'

The host is in my user knownhosts file, but I don’t know how to propogate this through to the autoReplicate service. I’m at a loss for what to check next, any ideas?

Thanks!

OK, I’m not sure exactly what user the zfs-replicate service runs as, but if the backup target is in the global known-hosts it works. I set it with programs.ssh.knownHosts.

There’s a separate issue with the service going on in nixpkgs right now that I was also hitting at the same time and was increasing my confusion. Overlaying the new version was also necessary to get this to fully work.

2 Likes