SSH (SSHD_CONFIG)
Maior segurança no SSH
Categoria: Segurança
Software: SSH
[ Hits: 19.616 ]
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
Como aprovar Pull Requests em seu repositório Github via linha de comando
Como gerar um podcast a partir de um livro em PDF
Automatizando digitação de códigos 2FA no browser
Resolver problemas de Internet
Como compartilhar a tela do Ubuntu com uma Smart TV (LG, Samsung, etc.)
Organizando seus PDF com o Zotero
Erro no realm join [Resolvido]
Um programa para baixar vídeos: Parabolic
Como Definir o Painel Principal em Múltiplos Monitores no Linux Mint
tentando instalar em um notebook antigo o Linux LegacyOS_2023... (7)
BlueMail não abre no Kubuntu 25.04 (1)
Driver de rede realtek 8821ce bugado (8)