From ec1e7b1cccf465ffb3de5f878e444319cfc4c883 Mon Sep 17 00:00:00 2001 From: ulic-youthlic Date: Wed, 17 Sep 2025 00:25:17 +0800 Subject: [PATCH] fix(Cape): Fix ssh config due to updating --- home/alice/configurations/Cape/default.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/home/alice/configurations/Cape/default.nix b/home/alice/configurations/Cape/default.nix index bc5b0a0..2ee2fb9 100644 --- a/home/alice/configurations/Cape/default.nix +++ b/home/alice/configurations/Cape/default.nix @@ -47,14 +47,26 @@ ]; programs.ssh = { enable = true; - hashKnownHosts = true; extraOptionOverrides = { HostKeyAlgorithms = "ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ssh-rsa,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256"; KexAlgorithms = "curve25519-sha256@libssh.org,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256"; MACs = "hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com"; Ciphers = "chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr"; }; + enableDefaultConfig = false; 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"; + }; "github.com" = { hostname = "ssh.github.com"; port = 443;