I change the SSH port

Post Reply
atithasos
Junior Member
Posts: 4
Joined: 12 Feb 2014, 07:19

I change the SSH port

Post 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
Sergio
Junior Member
Posts: 1712
Joined: 12 Dec 2006, 14:56

Re: I change the SSH port

Post by Sergio »

did you restarted sshd for the changes to take effect?
atithasos
Junior Member
Posts: 4
Joined: 12 Feb 2014, 07:19

Re: I change the SSH port

Post by atithasos »

Yes i restarted but nothing happened
atithasos
Junior Member
Posts: 4
Joined: 12 Feb 2014, 07:19

Re: I change the SSH port

Post 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
Sergio
Junior Member
Posts: 1712
Joined: 12 Dec 2006, 14:56

Re: I change the SSH port

Post 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
atithasos
Junior Member
Posts: 4
Joined: 12 Feb 2014, 07:19

Re: I change the SSH port

Post 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!
Post Reply