aux: ssh reverse proxy

https://spoton.cz/index.php/2017/12/04/reverse-ssh-proxy-with-systemd/
This commit is contained in:
Sebastien Bourdeauducq 2022-09-17 19:41:19 +08:00
parent e15b25055b
commit dba987be15
1 changed files with 13 additions and 0 deletions

View File

@ -127,6 +127,19 @@ in
shell = pkgs.fish; shell = pkgs.fish;
}; };
systemd.services.ssh-reverse-proxy = {
description = "SSH Reverse Proxy";
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
serviceConfig = {
Restart = "always";
RestartSec = "1min";
User = "backupdl";
Group = "users";
ExecStart = "${pkgs.openssh}/bin/ssh -R 42.200.147.171:3940:localhost:22 -o ServerAliveInterval=60 -o ServerAliveCountMax=1 -o ExitOnForwardFailure=yes -N -T nixbld.m-labs.hk";
};
};
documentation.enable = false; documentation.enable = false;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
wget vim git usbutils pciutils file lm_sensors acpi wget vim git usbutils pciutils file lm_sensors acpi