Error when starting fail2ban if sshd enabled

I made a copy of jail.conf to jail.local. In which I uncomment the line to enable sshd:

#[sshd]
enabled = true

When I reload fail2ban I get the following error:

[[email protected] ~]# fail2ban-client reload
ERROR  Failed during configuration: File contains no section headers.
file: /etc/fail2ban/jail.local, line: 24
'enabled = true\n'

I have looked 2 hours on internet without finding out why I get this error.

Any help will be very apreciate.

2 Replies

I don't use fail2ban, but

[sshd]

is usually a comment.

Try just

[sshd]

Thanks! and so simple!!! a shame.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct