LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-06-2006, 03:59 PM   #1
Flappie_Snappie
LQ Newbie
 
Registered: Sep 2006
Posts: 2

Rep: Reputation: 0
starting SSH as a service during boot


Hey There guys!

I'm pretty new to linux and i am trying to start SSH as a system service during boot.
I have done this in the past with Gentoo but since i'm now running PClinux i don't know where to look anymore.
I thought i had to put the command in some script somewhere.......does anybody know i'm right?
Well.......if you know it i would be happy to hear it :-D.
 
Old 10-06-2006, 04:37 PM   #2
Panagiotis_IOA
Member
 
Registered: Jan 2006
Location: Hellas, Europe
Distribution: Slackware 12
Posts: 238

Rep: Reputation: 32
In Slackware there is a file named rc.sshd on the directory /etc/rc.d. If this file is set to executable then it loads the SSH daemon on boot. I don't know for PCLinux, try this directory. In case you'll not find it you could just write a small script that starts the service and then just put it in the folder that has all the boot-time scripts.
 
Old 10-06-2006, 04:39 PM   #3
jeelliso
Member
 
Registered: Oct 2005
Location: Knoxville, Tn (USA)
Distribution: OpenSUSE, Ubuntu
Posts: 250

Rep: Reputation: 30
PCLinux is rpm based right? Redhat uses /etc/init.d/ to store startup files, so you might try there.

~Justin
 
Old 10-06-2006, 04:49 PM   #4
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD
Posts: 2,117

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
Quote:
Originally Posted by Flappie_Snappie
I have done this in the past with Gentoo but since i'm now running PClinux i don't know where to look anymore.
This is where command line knowledge comes in handy. You're not dependant on any distro's GUI-widget. (Not saying you don't have CLI knowledge, ... just making a point illustrating WHY it's nice to have.)

I'm sure somebody else (who knows PClinux) can help with that GUI-widget, but below is the generic command line description. Note, the /etc/init.d/ssh file may already exist on your system. It could have been there since the get-go, or added when you installed the ssh package manually. The contents of this file may be different for different versions of sshd. You may even have to create one of your own (probably not though).

The symlinks can be created manually, or by using some GUI-widget that comes with your distro. Adjust per your runlevel preferences (A leading 'S' in the symlink name means "start the serrvice", a leading 'K' means "stop the service".)

Note: Startup script locations may vary slightly depending on what "style" of startup mechanism your distro adopted.

Code:
$ ls -l /etc/init.d/*ssh*
-rwxr-xr-x  1 root root 1891 2004-11-28 08:33 /etc/init.d/ssh

$ ls -l /etc/rc2.d/*ssh*
lrwxrwxrwx  1 root root 13 2005-10-21 10:53 /etc/rc2.d/S20ssh -> ../init.d/ssh

$ ls -l /etc/rc3.d/*ssh*
lrwxrwxrwx  1 root root 13 2005-10-21 10:53 /etc/rc3.d/S20ssh -> ../init.d/ssh

$ ls -l /etc/rc4.d/*ssh*
lrwxrwxrwx  1 root root 13 2005-10-21 10:53 /etc/rc4.d/S20ssh -> ../init.d/ssh

$ ls -l /etc/rc4.d/*ssh*
lrwxrwxrwx  1 root root 13 2005-10-21 10:53 /etc/rc4.d/S20ssh -> ../init.d/ssh

$ ls -l /etc/rc1.d/*ssh*
lrwxrwxrwx  1 root root 13 2005-10-21 10:53 /etc/rc1.d/K20ssh -> ../init.d/ssh

$ cat /etc/init.d/*ssh*
#! /bin/sh
set -e

# /etc/init.d/ssh: start and stop the OpenBSD "secure shell(tm)" daemon

test -x /usr/sbin/sshd || exit 0
( /usr/sbin/sshd -\? 2>&1 | grep -q OpenSSH ) 2>/dev/null || exit 0

if test -f /etc/default/ssh; then
    . /etc/default/ssh
fi
[blah, blah, blah - remainder of standard startup script deleted... ]
 
Old 10-06-2006, 07:15 PM   #5
Flappie_Snappie
LQ Newbie
 
Registered: Sep 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks so much Guys!!!
I verry happy with the command.
In gentoo i did indeed everything of the command line.....But i needed help from the Gentoo site for everything.
Your right on PClinux being RPM based.And i also have the /etc/init.d so ill look for more details there. I will find try out the command line suggestions you gave me.

I just found a GUI configuration tool in PClinux wich allowed me to let auto start the ssh deamon. Well it fixes the issue for me.....but it doesn't give me the satisfaction i was looking for. ;-).
Thanks again for the command I will try them out for sure! (or check was PClinus changed with the GUI tool).

ps....i don't have much CLI knowledge like you said :-D. And like you said: "You're not dependant on any distro's GUI-widget" i want to learn more on that!!!
 
  


Reply


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
stop a service from starting at boot? opaltoad Linux - Newbie 1 06-26-2006 06:59 PM
Starting SSH service jordanfang *BSD 3 04-03-2006 03:49 AM
Starting a Service at Boot as a Different user Butterbroetchen Linux - Security 2 05-16-2005 08:05 PM
Won't Boot - Starting Printer Service - Starting CUPS jeansond Linux - Newbie 0 10-11-2004 07:39 PM
starting a service at boot time fallen26 General 5 07-31-2004 01:21 PM


All times are GMT -5. The time now is 04:28 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration