bassjuh
Verified User
For the people that are new to a linux server and/or directadmin i decided to write this little how-to.
There are a lot spam and warez sites and also hackers that are trying to find other computers to put warez on for example to install software on it to send e.g. spam.
For all this is a really simpele solution, just change standard ssh port 21 to e.g. 337 or 9999, we are going to use 337 in this example. and we are only going to allow V2 Clients since V1 is a bit outdated.
I used CentOS 4.2 for this example.
First we are going to find our file, this file is standard located in /etc/ssh/ the file is called sshd_config
Now we are going to open the file up with or favorite text editor, i prefer nano. so i will invoke the command : nano /etc/ssh/sshd_config
now search for:
to load the settings we need to restart sshd, please make sure you did not make any typo's
To restart sshd we'll type: service sshd restart
and were done! now ssh will only allow logins on port 337 for V2 Clients
Edit: Forgot to mention, IF you have installed or enabled a firewall do not forget to set this port open!
Hope this is usefull for someone
There are a lot spam and warez sites and also hackers that are trying to find other computers to put warez on for example to install software on it to send e.g. spam.
For all this is a really simpele solution, just change standard ssh port 21 to e.g. 337 or 9999, we are going to use 337 in this example. and we are only going to allow V2 Clients since V1 is a bit outdated.
I used CentOS 4.2 for this example.
First we are going to find our file, this file is standard located in /etc/ssh/ the file is called sshd_config
Now we are going to open the file up with or favorite text editor, i prefer nano. so i will invoke the command : nano /etc/ssh/sshd_config
now search for:
replace this with#Port 22
Second, search for:Port 337
replace this with:#Protocol 2,1
now, save the file ( in nano, press ctrl+x , press y and enter )Protocol 2
to load the settings we need to restart sshd, please make sure you did not make any typo's
To restart sshd we'll type: service sshd restart
and were done! now ssh will only allow logins on port 337 for V2 Clients
Edit: Forgot to mention, IF you have installed or enabled a firewall do not forget to set this port open!
Hope this is usefull for someone