Results 1 to 7 of 7
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 ~ ...
- 08-26-2004 #1
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
- 08-26-2004 #2Linux Guru
- Join Date
- Apr 2003
- Location
- London, UK
- Posts
- 3,284
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:
JasonCode:cat /etc/init.d/template |sed 's/PROGRAM/\/usr\/sbin\/sshd/g' >/etc/init.d/sshd
- 08-28-2004 #3Just Joined!
- Join Date
- Aug 2004
- Posts
- 18
Bug that crept in through the upgrade to the latest openssh, they want full path now
- 08-28-2004 #4Just Joined!
- Join Date
- Aug 2004
- Posts
- 21
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.
- 08-28-2004 #5
- 08-28-2004 #6Linux Newbie
- Join Date
- May 2004
- Location
- Boston, MA
- Posts
- 246
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?
Situations arise because of the weather,
And no kinds of love are better than others.
- 08-28-2004 #7


Reply With Quote