From 798c2ca66cd030db079136f0e536943a0b0520ac Mon Sep 17 00:00:00 2001 From: nyanloutre Date: Sun, 30 Aug 2020 16:25:51 +0200 Subject: [PATCH] ajout SSH de secours --- systems/LoutreOS/configuration.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/systems/LoutreOS/configuration.nix b/systems/LoutreOS/configuration.nix index 9b8d3d2..0c08867 100644 --- a/systems/LoutreOS/configuration.nix +++ b/systems/LoutreOS/configuration.nix @@ -40,6 +40,8 @@ in autoScrub.enable = true; }; + hardware.usbWwan.enable = true; + # eno1 -> VLAN100 -> Internet # eno2 -> LAN # eno3 -> Legacy client DHCP @@ -53,7 +55,10 @@ in persistent = true; extraConfig = '' interface bouyges + metric 10 noarp + interface enp0s21u2 + metric 999 ''; }; @@ -135,6 +140,17 @@ in passwordAuthentication = false; }; + users = { + groups.autossh = { }; + users.autossh = { + home = "/home/autossh"; + createHome = true; + group = "autossh"; + }; + }; + + services.autossh.sessions = [ { extraArguments = "-N -R 0.0.0.0:2222:127.0.0.1:22 loutre@vps772619.ovh.net"; monitoringPort = 20000; name = "backup-ssh-reverse"; user = "autossh"; } ]; + security.sudo.wheelNeedsPassword = false; system.stateVersion = "18.03";