Add ssh-tunnel systemd unit to enable backups

from IPv4-only to IPv6-only host
This commit is contained in:
teutat3s 2022-08-14 20:11:10 +02:00
parent 3883f30b74
commit acab42eaef
Signed by untrusted user: teutat3s
GPG key ID: 4FA1D3FA524F22C1

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";
};
};
}; };
} }