SSH (SSHD_CONFIG)
Maior segurança no SSH
Categoria: Segurança
Software: SSH
[ Hits: 19.242 ]
Por: guimpel
Sempre tenho inumeras tentativas de Brute force e achei informações que me ajudaram a melhorar a proteção da minha conexão ssh, pois no meu trabalho ela e imprescindivel.
Port 22 # Aceita conexão somente do protocolo 2 Protocol 2 #ListenAddress 0.0.0.0 #ListenAddress :: # HostKey for protocol version 1 #HostKey /etc/ssh/ssh_host_key # HostKeys for protocol version 2 #HostKey /etc/ssh/ssh_host_rsa_key #HostKey /etc/ssh/ssh_host_dsa_key # Lifetime and size of ephemeral version 1 server key #KeyRegenerationInterval 3600 # o valor default da chave e de 768 bits, passe para 1024 ServerKeyBits 1024 # Logging #obsoletes QuietMode and FascistLogging #SyslogFacility AUTH #LogLevel INFO # Authentication: # Define o tempo maximo de tentativas de conexão LoginGraceTime 30 # Não permita ao usuario root conectar PermitRootLogin no # StrictModes yes #RSAAuthentication yes #PubkeyAuthentication yes #AuthorizedKeysFile .ssh/authorized_keys # rhosts authentication should not be used #RhostsAuthentication no #Don't read the user's ~/.rhosts and ~/.shosts files #IgnoreRhosts yes #For this to work you will also need host keys in /etc/ssh/ssh_known_hosts #RhostsRSAAuthentication no #similar for protocol version 2 #HostbasedAuthentication no #Change to yes if you don't trust ~/.ssh/known_hosts for #RhostsRSAAuthentication and HostbasedAuthentication #IgnoreUserKnownHosts no # To disable tunneled clear text passwords, change to no here! # solicita a todos a utilização de senha PasswordAuthentication yes # Não permite usuarios sem senha PermitEmptyPasswords no # Change to no to disable s/key passwords #ChallengeResponseAuthentication yes # Kerberos options #KerberosAuthentication no #KerberosOrLocalPasswd yes #KerberosTicketCleanup yes #AFSTokenPassing no # Kerberos TGT Passing only works with the AFS kaserver #KerberosTgtPassing no # Set this to 'yes' to enable PAM keyboard-interactive authentication # Warning: enabling this may bypass the setting of 'PasswordAuthentication' #PAMAuthenticationViaKbdInt no #X11Forwarding no #X11DisplayOffset 10 #X11UseLocalhost yes #PrintMotd yes #PrintLastLog yes #KeepAlive yes #UseLogin no #UsePrivilegeSeparation yes #PermitUserEnvironment no #Compression yes # Desta forma ele rejeita 80% das tentativas de conexões que passarem do limite de 05 ate alcançar no maximo 10 conexões MaxStartups 5:80:10 # no default banner path #Banner /some/path #VerifyReverseMapping yes Subsystem sftp /usr/libexec/sftp-server
Atualizar o macOS no Mac - Opencore Legacy Patcher
Crie alias para as tarefas que possuam longas linhas de comando - bash e zsh
Criando um gateway de internet com o Debian
Configuração básica do Conky para mostrar informações sobre a sua máquina no Desktop
Aprenda a criar músicas com Inteligência Artificial usando Suno AI
Instalando Zoom Client no Ubuntu 24.04 LTS
Instalando Zoom Client no Fedora 40
Instalando Navegador Firefox no Debian 12
Bloqueando propagandas no Youtube e outros sites com o uBlocker Origin
Configurando static ipv6 em placa de rede eth0[DUVIDA] (1)
Sistema da Coréia do Norte - Red Star OS (59)
Comando interno CD não funciona (16)
Dificuldade em ler binário (12)
Em que pasta/arquivo ficam as configurações das janelas em derivados d... (2)