Brute force attack is very dangeroous attack , if you own a hosting server. your are most likely to become a victim of bruteforce /dictionary attack. there is couple of precautionary step you can take to save your box from this sort of attack .
1.) install deny host or fail to ban and enable threshold system .
2. secure SSH Port .
in this tutorial we'll discuss how to change shell port / secure your SSH, we'll also configure ssh to force ssh2 connections.
login to your server's shell/terminal window with root privilege .
Open the SSH configuration file type :
$ vi /etc/ssh/sshd_config
uncomment #Port 22 to any port (upto 49151)
for this tutorial, i choose 49150 so it become
port 49150
now scroll down find following line
#Protocol 2,1
under this type
Protocol 2
now find following line
# override default of no subsystems
in here we'll set username who can access to shell . in this example we allow root user only, you can add /remove users as you want .
AllowUsers root
Now , press CTRL O
then shift ZZ to save the file
restart your shell with following command
/etc/rc.d/init.d/sshd restart
You are done .
please take a note of your Port No and keep it in the safe place .
Copyright : www.mybanglaspace.com/durjoy [please do not copy or publish this blog without my permission]
Tags: Shell Linux Security Network Server Hosting Ssh