Find the answer to your Linux question:
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 ~ ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru kkubasik's Avatar
    Join Date
    Mar 2004
    Location
    Lat: 39:03:51N Lon: 77:14:37W
    Posts
    2,396

    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
    Avoid the Gates of Hell. Use Linux
    A Penny for your Thoughts

    Formerly Known as qub333

  2. #2
    Linux 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:
    Code:
    cat /etc/init.d/template |sed 's/PROGRAM/\/usr\/sbin\/sshd/g' >/etc/init.d/sshd
    Jason

  3. #3
    Just Joined!
    Join Date
    Aug 2004
    Posts
    18
    Bug that crept in through the upgrade to the latest openssh, they want full path now

  4. $spacer_open
    $spacer_close
  5. #4
    Just 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.

  6. #5
    Linux Guru kkubasik's Avatar
    Join Date
    Mar 2004
    Location
    Lat: 39:03:51N Lon: 77:14:37W
    Posts
    2,396
    Agreed, I just go lost with the differnt paths ectetera. No worrries, once i tried the complete path, works like a charm!
    Avoid the Gates of Hell. Use Linux
    A Penny for your Thoughts

    Formerly Known as qub333

  7. #6
    Linux 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.

  8. #7
    Linux Guru kkubasik's Avatar
    Join Date
    Mar 2004
    Location
    Lat: 39:03:51N Lon: 77:14:37W
    Posts
    2,396
    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.
    Avoid the Gates of Hell. Use Linux
    A Penny for your Thoughts

    Formerly Known as qub333

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •