Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 10-06-2006, 02:59 PM   #1
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, 03:37 PM   #2
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, 03:39 PM   #3
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.

Old 10-06-2006, 03:49 PM   #4
Senior Member
Registered: Nov 2004
Distribution: Debian, Ubuntu, LinuxMint, Slackware, SysrescueCD, Raspbian, Arch
Posts: 2,274

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
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.

$ 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
[blah, blah, blah - remainder of standard startup script deleted... ]
Old 10-06-2006, 06:15 PM   #5
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!!!


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

All times are GMT -5. The time now is 01:15 AM.

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