Merge pull request 'Add ssh-tunnel systemd unit to enable backups' (#118) from fix/backup-reverse-ssh-tunnel into b12f

Reviewed-on: https://git.b12f.io/pub-solar/os/pulls/118
This commit is contained in:
Benjamin Bädorf 2022-08-14 18:12:42 +00:00
commit 1cf710be78
No known key found for this signature in database
GPG key ID: 5FEAFA6A0FC8075D

View file

@ -25,5 +25,18 @@ in
]; ];
} }
]; ];
systemd.user.services.ssh-tunnel-cloud-pub-solar = {
unitConfig = {
Description = "Reverse SSH connection to enable backups from IPv4-only to IPv6-only host";
After = [ "network.target" ];
};
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.openssh}/bin/ssh -vvv -g -N -T -o 'ServerAliveInterval 10' -o 'ExitOnForwardFailure yes' -R 127.0.0.1:22022:localhost:22 cloud.pub.solar";
Restart = "always";
RestartSec = "5s";
};
};
}; };
} }