LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   getting sshd to start at boot (https://www.linuxquestions.org/questions/linux-software-2/getting-sshd-to-start-at-boot-129438/)

eros 12-28-2003 01:57 AM

getting sshd to start at boot
 
first off

running redhat 6.2 sparc
on a sparc station5

i want sshd to start at startup... i know init would probably be the best way to start it.. im just woundering how i would go about configuring init to do so.. a link to a doc on howto would be awsome!!

also telnet net is running... i dont use it but should i run it... questions questions hehe..its not a busy server at all.. but for flexibility should i run it?

ToniT 12-28-2003 03:09 AM

man init
man inittab

There should be a file /etc/init.d/ssh or /etc/init.d/sshd as part of the distributed ssh package.
To automaticly start it, but a symlink to /etc/rcX.d, where X is one of 1,2,3,4,5,6 or S. Meanings of these numbers (and S) depends from distribution to other, but usually 1 is for single user mode, 2-5 normal user (IIRC RH uses 5 by default; see your /etc/inittab), 6 for reboot and S for halt.

For telnet; if the computer is not behind a firewall, you shouldn't use it, but for a trusted network, telnet is good fallback system in case others don't let you in. (and for windows hosts with crippled (base) installation not having ssh clients).

eros 12-28-2003 12:13 PM

i dont have an init.d directory in /etc.. tho there is one in /etc/rc.d/init.d if thats what you ment? and even so there is no file name with sshd or ssh.

ToniT 12-30-2003 02:42 AM

ok, in debian init.d directory is located in /etc, but I think that is functionally the same you found. If there is no readymade initialization script for sshd, you can make one yoursef (you can take example from other files in that directory).

Alternatively (probably easier) you can just put the necessary commands ('/usr/sbin/sshd') to start sshd to the end of your rc.local file (located in /etc/, /etc/rc.d or /etc/init.d or somewhere similar places).

eros 12-31-2003 03:05 AM

awsome thanks all for your help!

eros 12-31-2003 03:15 AM

a example of this in rc.local

./usr/local/sbin/sshd

correct?

ToniT 12-31-2003 06:03 AM

If the sshd normally forks in to backround (that is, returns to shell / continues execution of the script. Atleast my version does so.), then that should do it.

ugge 12-31-2003 06:44 AM

At least the later versions of Red Hat has a utility called ntsysv to control wich services that start at certain run levels.
Run ntsysv from console and check if you can check the sshd for start at the current run level.

eros 12-31-2003 01:06 PM

error reading from directory /etc/rc.d/init.d: Too many levels of symbolic links

thats the error i get when running ntsysv


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