2024년에 SSH 강화를 올바르게 보호하는 방법은 무엇입니까?

2024년에 SSH 강화를 올바르게 보호하는 방법은 무엇입니까?

1995년 이후 SSH는 특히OpenSSH 서버[1999]는 관리자가 IT 환경을 관리하는 데 필요한 DNS [1985]와 같은 필수 서비스 중 하나입니다.

2024년에 OpenSSH 서버를 올바르게 보호하려면 어떻게 해야 합니까?

  • 데비안 12OpenSSH_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.

관련 정보