how to block hackers login attempts

i get a lot of login attempts to my server…
how i can block them permanently?

in wich server? ssh webmin? yo can change all ports for thats daemon

i see them when i use putty SSH, everytime i login it say failed ( numbers of login attempts by thousands ) i have changed the port for webmin page many times, is there anyway i can block any IP that try to login?
thank you

in /etc/ssh/sshd_config change Port with another port and restart sshd,remember change port in putty

wow thank you so much Nazcar


hi, fail2ban is very effective and simple solution to use.