Number of failed login using SSH Dictionary attack

Dears how to Block the connection after 3 to 5 login attempts using SSH Dictionary attack

Fastest way is modifying sshd_conf file, and adjusting directive MaxAuthTries to 3 for example. In case of automatized attacks, it would be neccessary implement other software as Fail2ban os Denyhosts, that creates blacklists.

Regards