Как правильно укрепить защиту SSH в 2024 году?

Как правильно укрепить защиту SSH в 2024 году?

С 1995 года SSH, в частностиOpenSSH-сервер[1999] — одна из тех важнейших служб, как DNS [1985], позволяющая администраторам управлять своими ИТ-ландшафтами.

Как правильно усилить защиту сервера OpenSSH в 2024 году?

  • Debian 12 сOpenSSH_9.2, OpenSSL 3.0.11 19 Sep 2023
    • Применено всерекомендации, пройдя стандартный тест и провалив «усиленный» тест, заявив:
      • он не любит использовать[email protected]
      • сервер использует 8192 бита вместо 4096(чем больше, тем лучше?)

  • 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

Ваша проблема может быть такой же, как в отчете об ошибке
Неизвестный алгоритм:[email protected]#228.

Если это то же самое, то его поддержка предположительно была добавлена ​​20 декабря 2023 года в ssh-аудит v3.1.0.

Связанный контент