Page 1 of 1

I change the SSH port

Posted: 12 Feb 2014, 07:26
by atithasos
Hello in my server i change the ssh port from 22 to 4176
i also open the tcp_in and tcp_out this port and delete the 22

I can login to the ssh. I also try from another ip to be blocked or alerted.
Nothing happened
In the allow ips this ip it is not stated there
also in deny

so what can i do to be informed or even alerted whenever someone tries to login in this port??

Thanks in adavnce

Re: I change the SSH port

Posted: 14 Feb 2014, 18:28
by Sergio
did you restarted sshd for the changes to take effect?

Re: I change the SSH port

Posted: 19 Feb 2014, 21:32
by atithasos
Yes i restarted but nothing happened

Re: I change the SSH port

Posted: 19 Feb 2014, 21:35
by atithasos
i check this file
/etc/ssh/sshd_config it has the Port 4176
but in the CSF
i saw this
PORTS_sshd = 22 (restricted UI item)
(i can not edit it)

Also my server respond only to the new port

Re: I change the SSH port

Posted: 19 Feb 2014, 23:07
by Sergio
above PORTS_sshd, it reads:
"This list is replaced, if present, by "Port" definitions in /etc/ssh/sshd_config"

So, the number that is in gray doesn't matter if you have defined "PORT" in your sshd_config file.
But if you don't like to see the port "22", you can change it manually modifying csf.conf directly, after you save the change you will see any number that you write there.

Sergio

Re: I change the SSH port

Posted: 21 Feb 2014, 06:04
by atithasos
Ok but still now i dont receive any alert message in this port!
i also try to use it from another ip and nothing happens!