Activer SSH (1987) et mosh

mosh s'établit d'abord en SSH (TCP 1987) puis bascule en UDP
60000-61000, plage fixe imposée par mosh, non paramétrable.

Le mot de passe de session reste utilisable (PasswordAuthentication
par défaut à true), pratique sur le réseau local.

*Rédaction assistée par IA (Gemini 3 Pro)*

Co-Authored-By: Gemini 3 Pro
This commit is contained in:
Pierre Martin
2026-10-30 08:16:58 +01:00
co-authored by Sans.pub
parent ecf42da629
commit c4676f88e4
+13 -4
View File
@@ -29,7 +29,7 @@
# Enable networking # Enable networking
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
networking.extraHosts = "109.238.11.111 nuage-v1.une-frouzins.fr"; networking.extraHosts = "";
# Wildcard *.dev.local → 127.0.0.1, requis par gezy-local (Traefik route les # Wildcard *.dev.local → 127.0.0.1, requis par gezy-local (Traefik route les
# sous-domaines clients). systemd-resolved ne sait pas répondre en wildcard : # sous-domaines clients). systemd-resolved ne sait pas répondre en wildcard :
@@ -125,6 +125,9 @@
]; ];
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
# Conteneurs rootless (Yuto tourne dans Podman, cf. INSTALL-PODMAN.txt)
virtualisation.podman.enable = true;
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
# started in user sessions. # started in user sessions.
# programs.mtr.enable = true; # programs.mtr.enable = true;
@@ -201,11 +204,17 @@
SystemMaxUse = "500M"; SystemMaxUse = "500M";
}; };
# Enable the OpenSSH daemon. # Accès distant SSH + mosh (session interactive résistante aux coupures réseau).
# services.openssh.enable = true; # mosh s'établit d'abord en SSH (TCP 1987) puis bascule en UDP 60000-61000.
services.openssh = {
enable = true;
ports = [ 1987 ];
openFirewall = true;
};
programs.mosh.enable = true; # ouvre UDP 60000-61000
# Open ports in the firewall. # Open ports in the firewall.
# Ports: 9003 - Xdebug # Ports: 9003 - Xdebug, 1987 - SSH (mosh), 60000-61000 - mosh UDP
networking.firewall.allowedTCPPorts = [ 9003 ]; networking.firewall.allowedTCPPorts = [ 9003 ];
networking.firewall.allowedUDPPorts = [ 9003 ]; networking.firewall.allowedUDPPorts = [ 9003 ];
# Or disable the firewall altogether. # Or disable the firewall altogether.