Borgbackup setup on NixOs

I am trying to backup my dropbox directory from my home directory to I following this blog post: How to Set Up Borg Backup on NixOS - Xe Iaso and I have looked at NixOS 23.05 manual and but I cannot seem to figure out the issue with why I am not the backup is not starting on borgbase. I have copied my root ssh public key to borgbase website too.

sudo ssh-keygen -N '' -t ed25519 -f /root/.ssh/id_ed25519_borgbase

This is a screenshot the nix code I have and the system status of the service created. I have also pasted the code below. Any help would be greatly appreciated.

}: {
  # use agenix for passCommand
  age.identityPaths = [
  age.secrets.borgbackup-xps17-nixos.file = ../../secrets/borgbackup-xps17-nixos.age; = {
    dropbox_backup = {
      paths = ["/home/morp/Dropbox/"];
      exclude = ["'**/.cache'"];
      repo = "";
      encryption = {
        mode = "repokey-blake2";
        passCommand = "cat ${config.age.secrets.borgbackup-xps17-nixos.path}";
      environment = {BORG_RSH = "ssh -i /root/.ssh/id_ed25519_borgbase ";};
      compression = "auto,zstd";
      startAt = "daily";

I can’t see anything obvious in your configuration.

Interesting is that if I use my borgbase connection I get response from SSH-2.0-OpenSSH_8.0 while when trying your one it is SSH-2.0-OpenSSH_7.4.

See telnet 22 . They must be using some quite old servers somewhere which is quite worrying. For example NixOS 22.05 is using SSH-2.0-OpenSSH_9.1.

Ubuntu 18.04 is using OpenSSH 7.6 with some patches. So they must be running something older.

telnet 22

also reveals the borgbase server is runnning SSH-2.0-OpenSSH_7.4 as you pointed out. I am currently running the unstable version of nixos i.e. 23.05. Not sure how this affects the borgbase servers. Does the client and server have to be running the same versions of the openssh protocol?

No, server doesn’t need to run the same SSH version. But 7.4 is too old from security perspective and actually it might also be the problem to log in from new client version without some additional tweaks.

Try to run following command as root user:

ssh -v -i /root/.ssh/id_ed25519_borgbase

to check if your SSH connection works. It should give you something like PTY allocation request failed on channel 0.

I received that error when I tried sshing into the borgbase server to update the ssh server.