2024 年に SSH を適切に保護して強化するにはどうすればよいですか?

2024 年に SSH を適切に保護して強化するにはどうすればよいですか?

1995年以来、SSHは特にOpenSSH サーバー[1999]は、管理者がIT環境を管理するためにDNS [1985]のような重要なサービスの一つです。

2024 年に OpenSSH サーバーを適切に強化するにはどうすればよいですか?

  • Debian 12とOpenSSH_9.2, OpenSSL 3.0.11 19 Sep 2023
    • すべて適用推奨事項標準テストに合格し、「強化」テストに不合格となった。
      • 使用したくない[email protected]
      • サーバーは4096ビットではなく8192ビットを使用しています(多ければ多いほど良い?)

  • sshd_config:
    # Ports and Addresses:
      ## it is (probably) advisable to change this to something else but nothing
      ## beyond 1024 privileged ports?
      ## https://www.w3.org/Daemon/User/Installation/PrivilegedPorts.html
    
    #Port                            = 22
    #AddressFamily                   = any
    #ListenAddress                   = 0.0.0.0
    #ListenAddress                   = ::
    
    Include                         = /etc/ssh/sshd_config.d/*.conf
    
    # Logging
      ## it is disabled per default on Debian maybe because of brute force attacks
      ## spamming the logs?
    
    SyslogFacility                  = AUTH
    LogLevel                        = INFO
    
    # Authentication:
    Protocol                        = 2
    StrictModes                     = yes
    LoginGraceTime                  = 3m
    MaxAuthTries                    = 3
    ClientAliveInterval             = 300
    ClientAliveCountMax             = 2
    
    PermitRootLogin                 = no
    PermitEmptyPasswords            = no
    PubkeyAuthentication            = yes
    KbdInteractiveAuthentication    = no
    UsePAM                          = no
    
    ## not so sure about this one
    ChallengeResponseAuthentication = no
    
    ## this has no effect?
    PasswordAuthentication          = no
    
    ## good practice, but is it enough?
    AllowUsers                      = username
    
    X11Forwarding                   = no
    PrintMotd                       = no
    AcceptEnv LANG                  = LC_*
    X11Forwarding                   = no
    
    # override default of no subsystems
    ### Subsystem sftp                  = /usr/lib/openssh/sftp-server
    
    # Ciphers and keying
    KexAlgorithms                   = [email protected],curve25519-sha256,[email protected],gss-curve25519-sha256-,diffie-hellman-group16-sha512,gss-group16-sha512-,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha256
    Ciphers                         = [email protected],[email protected],[email protected],aes256-ctr,aes192-ctr,aes128-ctr
    MACs                            = [email protected],[email protected],[email protected]
    

答え1

あなたの問題はバグレポートと同じかもしれません
不明なアルゴリズム:[メールアドレス]#228

同じであれば、2023年12月20日にサポートが追加されたはずです。 ssh 監査 v3.1.0

関連情報