{ config, pkgs, lib, ... }: let inherit (lib) concatStringsSep; mkDefault = lib.mkOverride ((lib.mkDefault null).priority - 1); # SSL added and removed here ;-) bannedAlgorithms = [ "ecdsa-sha2-nistp256-cert-v01@openssh.com" "ecdsa-sha2-nistp384-cert-v01@openssh.com" "ecdsa-sha2-nistp521-cert-v01@openssh.com" "ecdsa-sha2-nistp256" "ecdsa-sha2-nistp384" "ecdsa-sha2-nistp521" ]; in { programs.mosh.enable = mkDefault config.services.openssh.enable; programs.ssh.extraConfig = '' CASignatureAlgorithms -${concatStringsSep "," bannedAlgorithms} HostKeyAlgorithms -${concatStringsSep "," bannedAlgorithms} VerifyHostKeyDNS ask Host uhura spock HostName %h.edef.eu Host hyperion HostName %h.kookie.space Host atuin HostName %h.qyliss.net Host github gitlab HostName %h.com Host cl.tvl HostName %h.fyi Port 29418 Host slide-rule relay01 HostName relay01.nixcon.net Host abacus dash01 HostName dash01.nixcon.net Host salsa HostName %h.debian.org Match host gitlab.freedesktop.org,salsa.debian.org VerifyHostKeyDNS yes Match host github.com,gitlab.*,salsa.debian.org User git ''; services.openssh.authorizedKeysFiles = [ "${./keys}/%u.keys" ]; services.openssh.strictModes = false; users.users.root.openssh.authorizedKeys.keyFiles = [ ./keys/qyliss.keys ]; programs.ssh.knownHostsFiles = [ ./keys/cl.tvl.keys ./keys/edef.keys ./keys/github.keys ./keys/gitlab.keys ./keys/salsa.keys ]; }