From 77a71380c38fb2a440b4b5881bbc839f6230e1cb Mon Sep 17 00:00:00 2001 From: Aguirre Matteo Date: Fri, 29 Aug 2025 12:52:05 -0300 Subject: [PATCH] ssh: provide code snippet in enableDefaultConfig description --- modules/programs/ssh.nix | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/programs/ssh.nix b/modules/programs/ssh.nix index 899397f01..f73da437b 100644 --- a/modules/programs/ssh.nix +++ b/modules/programs/ssh.nix @@ -559,6 +559,21 @@ in description = '' Whether to enable or not the old default config values. This option will become deprecated in the future. + For an equivalent, copy and paste the following + code snippet in your config: + + programs.ssh.matchBlocks."*" = { + forwardAgent = false; + addKeysToAgent = "no"; + compression = false; + serverAliveInterval = 0; + serverAliveCountMax = 3; + hashKnownHosts = false; + userKnownHostsFile = "~/.ssh/known_hosts"; + controlMaster = "no"; + controlPath = "~/.ssh/master-%r@%n:%p"; + controlPersist = "no"; + }; ''; }; };