-
ssh problems
Ive placed below everything that i have tried, the forums wouldn't let me search for anything with the keyword ssh. reguardless ant thought as to the problem?
Code:
kevin@yos ~ $ su
Password:
root@yos kevin # cat /etc/init.d/template |sed 's/PROGRAM/sshd/g' >/etc/init.d/sshd
root@yos kevin # chmod +x /etc/init.d/sshd
root@yos kevin # ln -s /etc/rc.d/init.d/sshd /etc/rc.d/rc5.d/S30sshd
root@yos kevin # /etc/init.d/sshd start
sshd re-exec requires execution with an absolute path
root@yos kevin # ps -aux | grep ssh
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
root 22551 0.0 0.0 3544 512 pts/1 R+ 16:47 0:00 grep ssh
root@yos kevin # ps -aux | grep sshd
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
root 22567 0.0 0.1 3544 516 pts/1 S+ 16:47 0:00 grep sshd
root@yos kevin # ps -aux | grep openssh
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
root 22577 0.0 0.1 3544 516 pts/1 S+ 16:47 0:00 grep openssh
root@yos kevin # cd /etc
root@yos etc # cd init.d
root@yos init.d # ls
536ep-boot dhcpcd functions kdm local rc5.d template
alsasound dhcpd gpm kdm.orig network reboot udev
crond dhcrelay halt kudzu network.old samba vsftpd
cups fbset hotplug lisa portmap sshd xinetd
cupsd firstboot hwscan lissetup.sh rc sysklogd
root@yos init.d # sshd
sshd re-exec requires execution with an absolute path
root@yos init.d # ./sshd
Usage: ./sshd {start|stop|restart|}
root@yos init.d # ./sshd restart
Terminated
root@yos init.d # ./sshd stop
Terminated
root@yos init.d # ./sshd start
sshd re-exec requires execution with an absolute path
root@yos init.d # /etc/rc.d/rc5.d/S30sshd start
sshd re-exec requires execution with an absolute path
-
If im understanding correctly... you will likely want to rebuild the initd ssh start script using the full path to sshd. (eg, "/usr/sbin/sshd" and not just "sshd").
with that example in mind, your line would be:
Code:
cat /etc/init.d/template |sed 's/PROGRAM/\/usr\/sbin\/sshd/g' >/etc/init.d/sshd
Jason
-
Bug that crept in through the upgrade to the latest openssh, they want full path now :shock:
-
It's better from a security standpoint to do it that way. That way you always know you are running the binary you mean to and not one that somehow crept into your $PATH. For example, could you imagine the kinds of problems that could be caused if someone managed to put a fake 'passwd' binary in your path? The fake binary could send out any password changes you make to the author, and then execute the real 'passwd' so you would have no way of knowing. Now, if you call /sbin/passwd directly with the full path, you won't have to worry about such security concerns, farfetched as they may be.
Man, it is worth installing OpenBSD just to read 'man afterboot'. All the security things you learn while reading that manpage are priceless. 8)
-
Agreed, I just go lost with the differnt paths ectetera. No worrries, once i tried the complete path, works like a charm!
-
It doesn't seem like the /sbin/passwd thing is a real problem, as long as you make sure you put "/sbin" before everything else in your PATH variable. I mean, only root can write to /sbin, and if someone else has the ability to change your PATH variable, they probably already know your password, right?
-
Probably, but who knows it only takes one real creative cracker to make your life miserable. As long as it works, its fine by me.