How do you close port 22 SSH?
I'm trying to secure my box and so far i've shut down ports in /etc/rc.inet1.conf that i don't use. When i run nmap it says port 22 ssh is open. How do i close this port other than a firewall rule? I looked in the /etc/rc.d directory, but can't figure out how you shut it off. I googled and read that it is to be disabled in /etc/rc.config, but i don't have an rc.config. I have a rc.inetd1.conf where i commented out the other ports i have no use for, but ssh isn't in there. There is a rc.sshd, but i don't see an option to disable it there either.
|
Why not just turn off sshd?
|
That's what i am trying to do! How do i do that?
|
Do you have a service configuration utility that comes with Slackware? (I'm not familiar with it.) It would be in the main menu under configuration/system settings or the like.
Or check /etc/services (if you have that file). Do a search for ssh and just put a # before that line. Reboot and that should do it. If you don't have that file, just look in /etc for something like serv* |
I have a /etc/service file and commented out the ssh line, rebooted, but tcp port 22 is still open.
ftp 21/tcp #File Transfer [Control] ftp 21/udp #File Transfer [Control] #ssh 22/tcp #Secure Shell Login ssh 22/udp #Secure Shell Login telnet 23/tcp telnet 23/udp |
Did you try commenting out the UDP below it, as well?
|
To permanently end sshd
Code:
/etc/rc.d/rc.sshd stop |
Cool! The /etc/rc.d/rc.sshd stop & chmod -x /etc/rc.d/rc.sshd commands worked. Thanks
|
All times are GMT -5. The time now is 09:10 AM. |