fail2ban error sshd log file

COMPARTILHAR:

Whatsapp Telegram Twitter Facebook Reddit

ERROR Failed during configuration: Have not found any log file for sshd jail

Se ao configurar o fail2ban você recebe a mensagem: "ERROR Failed during configuration: Have not found any log file for sshd jail" , saiba como resolver seguindo o passo a passo abaixo.

Cheque se o arquivo auth.log existe em seu sistema utilizando o comando abaixo:

[ls -l /var/log/auth.log]

Se não existir, tente instalar o rsyslog e confira se ele aparecerá no sistema:

[sudo apt install rsyslog]

Em seguida, edite seu arquivo jail.local localizado em /etc/fail2ban .

Dentro do arquivo em [sshd] defina a seguinte configuração:

[port    = ssh

logpath = /var/log/auth.log

backend = %(sshd_backend)s]

Em seguida reinicie os serviços sshd e fail2ban: 

[sudo systemctl restart sshd]

[sudo systemctl restart fail2ban]


Com outro IP, tente se conectar com usuário errado. Para ver o banimento em funcionamento use o comando abaixo:

[sudo fail2ban-client status sshd]

A saída do comando acima será algo como:

Status for the jail: sshd

|- Filter

|  |- Currently failed: 0

|  |- Total failed:     5

|  `- File list:        /var/log/auth.log

`- Actions

   |- Currently banned: 1

   |- Total banned:     1

   `- Banned IP list:   xxx.xx.xxx.xxx

COMENTÁRIOS

Nome

#ann,25,#HK,30,#LTCode,130,Artigo - Diversos,156,Artigo - Games,201,Artigo - Tecnologia,619,autor-thomaz,7,Coluna - Alternative World,24,Coluna - Fail,12,Coluna - Tec Line,14,Criptomoeda,72,Curiosidades - Diversos,49,Curiosidades - Tecnologia,50,en,2,estudo,8,HN,12,logica,14,Pentest,23,Programar C,29,Programar POO,6,Programar Python,6,Programar Shell,25,Programar verilog,12,qradar,4,Raspberry Pi,15,Redes,3,root,119,Shorty Awards,1,Smartphones - Reviews,33,Teoria,10,Top Nostalgia,2,VPN,19,WhatsApp,46,
ltr
item
Limon Tec: fail2ban error sshd log file
fail2ban error sshd log file
ERROR Failed during configuration: Have not found any log file for sshd jail
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7nLlqXhkEAZCfRmzXuaM2Lk5KlUozgaIxSCAHppaUYGMlCvoewPz-kRiwHB36nfE8vNyyyZZbrJK7IuOIiEhp6f6nYq5tthqpuVeTpiZRgAseYYO1mL4iMHMvq_82IMyc0_EedcrOAvGdjLgHUY5KHeJ_ze3aToESIZo0xUohBoBxcYJpriIYBSYWOsKV/s320/fail2ban_not-%20found-any-log-file-for-sshd-jail.png
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7nLlqXhkEAZCfRmzXuaM2Lk5KlUozgaIxSCAHppaUYGMlCvoewPz-kRiwHB36nfE8vNyyyZZbrJK7IuOIiEhp6f6nYq5tthqpuVeTpiZRgAseYYO1mL4iMHMvq_82IMyc0_EedcrOAvGdjLgHUY5KHeJ_ze3aToESIZo0xUohBoBxcYJpriIYBSYWOsKV/s72-c/fail2ban_not-%20found-any-log-file-for-sshd-jail.png
Limon Tec
https://www.limontec.com/2025/01/fail2ban-error-sshd-log-file.html
https://www.limontec.com/
https://www.limontec.com/
https://www.limontec.com/2025/01/fail2ban-error-sshd-log-file.html
false
2157924926610706248
UTF-8
Carregar todos posts Não encontramos nenhum post VER TUDO Ler mais Responder Cancelar resposta Deletar Por Home PÁGINAS POSTS Ver tudo RECOMENDADO PARA VOCÊ LABEL ARQUIVO SEARCH TODOS POSTS Não encontramos nenhum post relacionado a sua requisição VOLTAR PÁGINA INICIAL Domingo Segunda Terça Quarta Quinta Sexta Sábado Dom Seg Ter Qua Qui Sex Sab Janeiro Fevereiro Março Abril Maio Junho Julho Agosto Setembro Outubro Novembro Dezembro Jan Fev Mar Abr Maio Jun Jul Ago Set Out Nov Dez apenas agora 1 minuto atrás $$1$$ minutes ago 1 hora atrás $$1$$ hours ago Ontem $$1$$ days ago $$1$$ weeks ago mais de 5 semanas atrás Seguidores Seguir ESTE CONTEÚDO ESTÁ BLOQUEADO PASSO 1: Compartilhe com seus amigos PASSO 2: Clique no link compartilhado Copiar Todo Código Selecionar Todo Código Todos códigos foram copiados para seu clipboard Não é possível copiar códigos / textos, por favor aperte [CTRL]+[C] (ou CMD+C no Mac) para copiar Tabela de conteúdo