LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   ssh listening on port 22 (https://www.linuxquestions.org/questions/linux-security-4/ssh-listening-on-port-22-a-189836/)

sharpie 06-04-2004 08:31 PM

ssh listening on port 22
 
I have every line commented in inetd.conf, yet ssh is listening on port 22. Obviously I can cure this by deleting the ssh deamon, as I'm not using it anyway, I just would like to know how this is listening when every line under inetd.conf is commented out?

bastard23 06-04-2004 08:56 PM

sharpie,

sshd is typically run independent of inetd. Check your init scripts (/etc/init.d, /etc/rc.d, /etc/init.d/rc.?) to see where it is run. You can probably just rename the binary (/usr/sbin/sshd -> /usr/sbin/sshd-norun).

Good Luck,
chris

Aeiri 06-05-2004 09:46 AM

chmod -x /etc/rc.d/rc.sshd

Ciccio 06-07-2004 11:00 AM

service sshd stop?

doehn 06-07-2004 11:05 AM

Hi,

why not

update-rc.d -f ssh remove

this won't cause a slow shutdown while trying to stop a non existent daemon or an error message

cu doehn

TheOther1 06-07-2004 12:20 PM

Edit /etc/ssh/sshd_config and change the port you want it to listen on. If you want to stop it altogether:
chkconfig --level 23456 sshd off
then service sshd stop

MS3FGX 06-07-2004 07:42 PM

You guys must not be familure with Slackware...

Aeiri got it right.

TheOther1 06-07-2004 08:56 PM

Just make it nonexecutable? Won't that just generate errors in your startup log when it's called?

MS3FGX 06-08-2004 01:04 AM

Slackware checks if the file exists and is executable before it tries to execute it, so there wouldn't be any errors if the file wasn't there, or was non-executable.

TheOther1 06-08-2004 03:28 PM

Cool, thanks.


All times are GMT -5. The time now is 04:59 PM.