MagnuM said:
Byt the way, I forgot to tell you, I have done this from SSH, because in Telnet I simply don't have the command service or chkconfig.
First of all,
always use ssh; never use telnet; it passes your passwords, including your root password when you use
su, in cleartext. I've you've ever logged in using telnet, now is the time for you to change your passwords.
I have loged with telnet as a normal user an the type su and password, but it seems that those commands does not exist when logged with Telnet.
All the commands that exist with
ssh exist with
telnet, and vice-versa.
The problem is you're using
su when you should be using
su -.
The former doesn't change your default path to root's path; the latter does. If you're not using root's path, then you must type in the complete path of many programs that are only to be executed by root. For example,
/sbin/service would have worked.
Do you think this is the problem.
No.
The point is when I hit chkconfig sshd on then the file is modified to disable=no.
You should probably delete the entire sshd file from the /etc/xinetd.d directory (of course don't delete it completely, but rather move it somewhere else for safekeeping; this will work:
mv /etc/xinetd.d/sshd /root/save-sshd
Then try:
service xinetd stop
service sshd stop
service sshd start
service xinetd start
(Note that some of the above may result in errors; that's okay.)
Then, to make sure sshd will start every time you reboot, check to see if it's set up to start properly:
ls -al /etc/rc.d/rc3.d/???sshd
What you should see is a symbolic link beginning with either S or K, then two numerical digits, then "sshd".
If it begins with S you're okay. If it begins with K, do this (as root):
cd /etc/rc.d/rc3.d
mv Kxxsshd Sxxsshd
where xx must be replaced by those two numerical digits.
If ls -al /etc/rc.d/rc3.d/???sshd doesn't return anything at all then you'll need to create a symbolic link:
cd /etc/rc.d/rc3.d
ln -s ../init.d/sshd S55sshd
Now sshd should work as a daemon.
Jeff