LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 08-13-2009, 01:39 PM   #1
ahartman
LQ Newbie
 
Registered: Jul 2009
Posts: 6

Rep: Reputation: 0
Disable ssh boot on a home desktop


Hi All

I have a xubuntu 9.04 home desktop system and
I won't be using ssh in the forseeable future.

What is the proper way to disable ssh on boot.
ssh-agent ?

TIA

Arye
 
Old 08-13-2009, 02:10 PM   #2
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
I think there is a small program to do it for you but I just remove the links from the RC:
Code:
$ ls -l /etc/rc?.*|grep ssh
lrwxrwxrwx 1 root root  13 2009-02-20 14:08 K84ssh -> ../init.d/ssh
lrwxrwxrwx 1 root root  13 2009-02-20 14:08 S16ssh -> ../init.d/ssh
lrwxrwxrwx 1 root root  13 2009-02-20 14:08 S16ssh -> ../init.d/ssh
lrwxrwxrwx 1 root root  13 2009-02-20 14:08 S16ssh -> ../init.d/ssh
lrwxrwxrwx 1 root root  13 2009-02-20 14:08 S16ssh -> ../init.d/ssh
 
Old 08-13-2009, 02:14 PM   #3
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Linux Mint
Posts: 8,501

Rep: Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883Reputation: 883
You can use
rcconf
Code:
sudo apt-get install rcconf
then in a terminal as root
Code:
sudo rcconf
 
Old 08-13-2009, 02:49 PM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,546
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
I don't know what rcconf does but anything that works by removing symlinks int /etc/rc[S0-6].d is prone to being undone on upgrade. Inspection of /etc/init.d/ssh shows that it does not start if file /etc/ssh/sshd_not_to_be_run exists; that is how the writers of the script intended it to be disabled.

Last edited by catkin; 08-13-2009 at 02:50 PM.
 
Old 08-13-2009, 02:53 PM   #5
harsshal
Member
 
Registered: Jul 2006
Location: New York, NY
Distribution: redhat,ubuntu,RHEL,fedora,centOS
Posts: 105

Rep: Reputation: 15
what if we change sshd_config ?e.g. "PasswordAuthentication no" and so on?
 
Old 08-14-2009, 12:25 PM   #6
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,008

Rep: Reputation: 367Reputation: 367Reputation: 367Reputation: 367
If you don't need or want ssh you can just uninstall it. Then it won't run.
 
Old 08-14-2009, 01:00 PM   #7
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Since Ubuntu supports chkconfig, "sudo chkconfig sshd off".
That will remove the symlinks in the /etc/init.d/rc.# run level directories.

You may have a graphical service configuration tool in your menu already.

Last edited by jschiwal; 08-14-2009 at 01:02 PM.
 
Old 08-14-2009, 01:08 PM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,546
Blog Entries: 28

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Bum! (Boot Up Manager)
 
Old 08-18-2009, 02:16 AM   #9
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
You could also simply remove the executable bit from /etc/init.d/ssh
 
  


Reply

Tags
boot, disable, initd, rcd, ssh


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to disable desktop effects on mandriva without reaching desktop truth believer Linux - Software 1 02-13-2009 05:57 PM
How to enable 2 ssh server : one for /home and one for /home/theuser only? frenchn00b Linux - Server 14 05-06-2008 05:37 PM
ssh connection refused - trying to set up ssh server at home openSauce Linux - Server 10 10-18-2007 04:38 PM
want to ssh/ftp to home machine (Slack) from office through home router fincher69 Linux - Networking 2 09-21-2005 10:55 PM
Help! ssh to home desktop is listening but not accepting password vrooje Linux - General 10 01-02-2005 08:22 PM


All times are GMT -5. The time now is 02:46 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration