From 92f842fe8afc9b1d8b2e738cb3fecf4854dbec2f Mon Sep 17 00:00:00 2001 From: Timo Bingmann Date: Sat, 20 Dec 2025 08:16:47 -0800 Subject: [PATCH] home/private/ssh-hosts: set up defaults --- home/private/ssh-hosts.nix | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/home/private/ssh-hosts.nix b/home/private/ssh-hosts.nix index 3b6fa13..c791bf0 100644 --- a/home/private/ssh-hosts.nix +++ b/home/private/ssh-hosts.nix @@ -3,11 +3,30 @@ programs.ssh = { enable = true; + enableDefaultConfig = false; + matchBlocks = let tb1 = "~/.ssh/id_rsa.tb1.pub"; tb2 = "~/.ssh/id_rsa.tb2.pub"; in { + # Defaults + "*" = { + # Configure sharing of multiple sessions over a single network connection. + controlMaster = "auto"; + # Specify path to the control socket used for connection sharing. + controlPath = "~/.ssh/master-%r@%n:%p"; + # Whether control socket should remain open in the background. + controlPersist = "10m"; + + # Set default timeout in seconds after which response will be requested. + serverAliveInterval = 15; + + # Whether the connection to the authentication agent (if any) will be forwarded to + # the remote machine. + forwardAgent = false; + }; + # HomeLab Machines "fs1" = { hostname = "fs1.t1.xyz"; @@ -37,6 +56,17 @@ identityFile = tb1; }; + "teb" = { + hostname = "teb"; + identityFile = tb1; + forwardAgent = true; + }; + "fix" = { + hostname = "fix"; + identityFile = tb1; + forwardAgent = true; + }; + # Cloud Machines "t1" = { hostname = "95.216.215.4";