LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 07-13-2004, 08:18 AM   #1
BajaNick
Senior Member
 
Registered: Jul 2003
Location: So. Cal.
Distribution: Slack 11
Posts: 1,737

Rep: Reputation: 46
How to disable ssh...?


How do I disable SSH? Ive uncommented every file in /etc/ssh and still it shows as allowed in rkhunter, also how can I check to see if its really allowed or not? Thanks.

Last edited by BajaNick; 07-13-2004 at 08:20 AM.
 
Old 07-13-2004, 09:15 AM   #2
Blinker_Fluid
Member
 
Registered: Jul 2003
Location: Clinging to my guns and religion.
Posts: 683

Rep: Reputation: 63
You probably want to stop the sshd service.

Not sure if it's any different on Slack but on a RH box:
chkconfig sshd off
service sshd stop

If those don't work remove the link in /etc/rc5.d/
 
Old 07-13-2004, 12:04 PM   #3
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,803
Blog Entries: 1

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
I think in Slackware sshd is started from /etc/rc.d/rc.sshd. Just make that non-executable with chmod. Otherwise I think there is an entry in rc.inet2 that you can comment out.
 
Old 07-13-2004, 12:23 PM   #4
BajaNick
Senior Member
 
Registered: Jul 2003
Location: So. Cal.
Distribution: Slack 11
Posts: 1,737

Original Poster
Rep: Reputation: 46
I dont have chkconfig, I guess thats a Redhat thing
I dont have a rc.5 file
and service sshd stop does nothing but gives me commmand not found.
 
Old 07-13-2004, 03:36 PM   #5
dee3lmo
LQ Newbie
 
Registered: Jul 2004
Location: The Netherlands
Distribution: Slackware 10.0
Posts: 9

Rep: Reputation: 0
chmod -x /etc/rc.d/rc.sshd

dee3lmo
 
Old 07-13-2004, 03:42 PM   #6
dee3lmo
LQ Newbie
 
Registered: Jul 2004
Location: The Netherlands
Distribution: Slackware 10.0
Posts: 9

Rep: Reputation: 0
sorry... must be

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

dee3lmo
 
Old 07-14-2004, 12:47 AM   #7
vasillalov
LQ Newbie
 
Registered: Jul 2004
Posts: 16

Rep: Reputation: 0
If you are sitting on a System V box then all you need to do is find the directory which contains all scripts for controlling all services. Usually this is the /etc/init.d directory. There you will see all the system-wide installed services and deamons. As root simply type in ./sshd stop and the SSHD deamon will exit gracefully.

If you want to disable this permanently, simply remove the start-up link to the sshd script. So lets say you are running X which means you are in runlevel 5. Go to /etc/rc.d/rc5.d .Then find the link to the sshd service by doing ls -al | grep ssh You will see one that starts with S (ex. S55sshd). Simply delete it and this will prevent starting the ssh deamon in the future!
 
Old 07-14-2004, 03:37 PM   #8
Crashbox
Member
 
Registered: Jun 2004
Location: USA
Distribution: Slackware
Posts: 137

Rep: Reputation: 22
Nick, the easiest way to disable SSH is to run pkgtool, choose "slackware installation scripts to run again" and then run the "services" script again. in that script you can disable SSH at bootup
 
Old 07-15-2004, 12:08 AM   #9
BajaNick
Senior Member
 
Registered: Jul 2003
Location: So. Cal.
Distribution: Slack 11
Posts: 1,737

Original Poster
Rep: Reputation: 46
Thanks everyone for all the help.
I ended up having to use chmod u-x /etc/rc.d/rc.sshd
Slack is a little different.

Last edited by BajaNick; 07-15-2004 at 12:11 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable Root login via ssh UltraSoul Solaris / OpenSolaris 3 02-09-2007 02:18 AM
disable root login with ssh linuxtesting2 Slackware 3 02-16-2005 12:33 PM
How can I disable root to ssh Soulstealer Linux - Security 2 12-12-2004 11:36 AM
How to disable CVS (or SSH) ? starless Linux - General 1 12-10-2004 03:57 PM
How to disable SSH timeout? d2army Linux - Networking 2 07-01-2004 05:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration