SSHD start on boot problem...
Hello,
I am having a small problem getting sshd to startup on boot (it works if I run it manually). sshd is not listed under my "services" section in the mandrake control center. Doing a service sshd start gives me "Extra argument start" but it doesnt startup the sshd service. Doing a chkconfig --add sshd gives me "service sshd does not support chkconfig" In my init.d directory is a sshd file, but its a binary file - not a script. I dont know if this is normal or not. There are no s??sshd ln's in my rc?.d directories. I am running Mandrake 9.0 and compiled ssh version 3.5p1 using md5 and pam options. I tried using the included rpm with Mandrake9, but couldnt get it to work. Thanks in advance.. |
>> In my init.d directory is a sshd file, but its a binary file - not a script. I dont know if this is normal or not.
Normal? Not in any distro I've ever used, init should be just that scripts. This is particularly true if your system uses insserv, in order to change what runlevel a service runs at when, you use inserv, the comments at the top of the file need to be edited (obviously not possible). This seems very unusual to me, though I haven't used Mandrake in a while. I have just checked the openssh rpm on a mandrake 9 cd, the file '/etc/rc.d/init.d/sshd' is an init script. |
Suppose the installed sshd is under /usr/local/sbin/sshd, make a symlink in /etc/rc?.d to point to /usr/local/sbin/sshd
cd /etc/rc3.d ln -sf /usr/local/sbin/sshd S##sshd pick ## somewhere in mid 20's to 50's, I believe it's ok, repeat for any runlevel you are likely to boot don't forget to create K links in rc0.d and rc6.d to shutdown sshd daemon gracefully |
Sorry for a little confusion, above might not work because of "extra argument" error, create /etc/init.d/sshd script containing
Code:
!/bin/sh ln -sf ../init.d/sshd S##sshd and in runlevel 0 and 6 ln -sf ../init.d/sshd K##sshd It should work, sorry for confusion, didn't think clearly :) P.S. the script is taken from stock slackware ssh install, substitute the path to sshd daemon and you'll be alright |
neo77777, thank you very much!
I edited your script to my paths, created those ln's... and PRESTO! |
All times are GMT -5. The time now is 08:13 AM. |