ssh debug - SCO

This is a discussion on ssh debug - SCO ; I need to increase debug level of my sshd. Can I do this without stopping the daemon ? If not, can I stop and start the sshd without reboot the system ? I ask this because I tried to kill ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: ssh debug

  1. ssh debug

    I need to increase debug level of my sshd.

    Can I do this without stopping the daemon ?

    If not, can I stop and start the sshd without reboot the system ?

    I ask this because I tried to kill -9 sshd process and then from the
    command line :
    sshd -ddd but the the command hangs before full starting the daemon
    ..

    I have 0s5.0.7


  2. Re: ssh debug

    pablo typed (on Tue, Sep 19, 2006 at 12:41:03PM -0700):
    | I need to increase debug level of my sshd.
    |
    | Can I do this without stopping the daemon ?

    No.

    | If not, can I stop and start the sshd without reboot the system ?

    Yes.

    | I ask this because I tried to kill -9 sshd process and then from the
    | command line :
    | sshd -ddd but the the command hangs before full starting the daemon
    | .
    |
    | I have 0s5.0.7

    Use /etc/init.d script or /etc/rc2.d script.

    --
    JP
    ==> http://www.frappr.com/cusm <==

  3. Re: ssh debug


    Jean-Pierre Radley ha escrito:

    > pablo typed (on Tue, Sep 19, 2006 at 12:41:03PM -0700):
    > | I need to increase debug level of my sshd.
    > |
    > | Can I do this without stopping the daemon ?
    >
    > No.
    >
    > | If not, can I stop and start the sshd without reboot the system ?
    >
    > Yes.
    >
    > | I ask this because I tried to kill -9 sshd process and then from the
    > | command line :
    > | sshd -ddd but the the command hangs before full starting the daemon
    > | .
    > |
    > | I have 0s5.0.7
    >
    > Use /etc/init.d script or /etc/rc2.d script.
    >
    > --
    > JP
    > ==> http://www.frappr.com/cusm <==


    I modify /etc/rc2.d scrip (TCP) addind -ddd but system hang ata
    startup when processing this command .

    Any idea ?


  4. Re: ssh debug


    ----- Original Message -----
    From: "pablo"
    Newsgroups: comp.unix.sco.misc
    To:
    Sent: Wednesday, September 20, 2006 2:46 AM
    Subject: Re: ssh debug


    >
    > Jean-Pierre Radley ha escrito:
    >
    >> pablo typed (on Tue, Sep 19, 2006 at 12:41:03PM -0700):
    >> | I need to increase debug level of my sshd.
    >> |
    >> | Can I do this without stopping the daemon ?
    >>
    >> No.
    >>
    >> | If not, can I stop and start the sshd without reboot the system ?
    >>
    >> Yes.
    >>
    >> | I ask this because I tried to kill -9 sshd process and then from the
    >> | command line :
    >> | sshd -ddd but the the command hangs before full starting the daemon
    >> | .
    >> |
    >> | I have 0s5.0.7
    >>
    >> Use /etc/init.d script or /etc/rc2.d script.
    >>
    >> --
    >> JP
    >> ==> http://www.frappr.com/cusm <==

    >
    > I modify /etc/rc2.d scrip (TCP) addind -ddd but system hang ata
    > startup when processing this command .
    >
    > Any idea ?


    Yes, man ssh and man ssh_config and man sshd

    man sshd_config:
    --snip--
    LogLevel
    Gives the verbosity level that is used when logging
    messages
    from ssh. The possible values are: QUIET, FATAL, ERROR,
    INFO,
    VERBOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3. The default is
    INFO.
    DEBUG and DEBUG1 are equivalent. DEBUG2 and DEBUG3 each
    specify
    higher levels of verbose output.
    --snip--


    man sshd:
    --snip--
    sshd rereads its configuration file when it receives a hangup
    signal,
    SIGHUP, by executing itself with the name and options it was
    started
    with, e.g., /usr/sbin/sshd.
    --snip--


    So, Undo the changes you did in /etc/tcp

    Then just,
    echo "LogLevel DEBUG3" >> /etc/ssh/sshd_config
    kill -1 `cat /etc/sshd.pid`

    Thats it.
    New sessions get the new verbosity. Existing sessions stay alive and stay
    the same. No killing, restarting, or suspending anything.
    Certainly no rebooting!

    If you want to affect all ssh sessions immediately not just new ones, and/or
    don't trust the pid file, or didn't know about the pid file,
    do this:
    ps -eopid,args |awk '($2~"sshd"){print $1}' |xargs kill -1

    You still haven't stopped or restarted anything or broken any existing
    sessions or suspended new ones etc...

    But in your case, because you edited the sshd command line itself, at least
    the top level sshd process needs to get killed and re-run, which means you
    may have to be a little more invasive to undo that if you haven't put it
    back already.
    If you have put /etc/tcp back the way it was already then just ignore the
    rest of this.

    This will kill the top level sshd process and optionanally all others too,
    so don't be logged in via ssh yourself and don't do it if there are a lot of
    users logged in.
    It also interrupts new sessions from being able to start up briefly.

    /etc/tcp stop

    # pick only one of a b or c

    # a) this kills only the top level sshd, so only affects new sessions, using
    the pid file
    kill `cat /etc/sshd.pid`

    # b) this kills only the top level sshd process, using ps
    ps -eopid,ppid,args |awk '($3~"sshd")&&($2==1){system("kill "$1)}'

    # c) this one kills all sshd processes
    ps -eopid,args |awk '($2~"sshd"){print $1}' |xargs kill

    /etc/tcp start

    Even in this "more invasive" option you still don't reboot.

    Brian K. White -- brian@aljex.com -- http://www.aljex.com/bkw/
    +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
    filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!





  5. Re: ssh debug


    Brian K. White ha escrito:

    > ----- Original Message -----
    > From: "pablo"
    > Newsgroups: comp.unix.sco.misc
    > To:
    > Sent: Wednesday, September 20, 2006 2:46 AM
    > Subject: Re: ssh debug
    >
    >
    > >
    > > Jean-Pierre Radley ha escrito:
    > >
    > >> pablo typed (on Tue, Sep 19, 2006 at 12:41:03PM -0700):
    > >> | I need to increase debug level of my sshd.
    > >> |
    > >> | Can I do this without stopping the daemon ?
    > >>
    > >> No.
    > >>
    > >> | If not, can I stop and start the sshd without reboot the system ?
    > >>
    > >> Yes.
    > >>
    > >> | I ask this because I tried to kill -9 sshd process and then from the
    > >> | command line :
    > >> | sshd -ddd but the the command hangs before full starting the daemon
    > >> | .
    > >> |
    > >> | I have 0s5.0.7
    > >>
    > >> Use /etc/init.d script or /etc/rc2.d script.
    > >>
    > >> --
    > >> JP
    > >> ==> http://www.frappr.com/cusm <==

    > >
    > > I modify /etc/rc2.d scrip (TCP) addind -ddd but system hang ata
    > > startup when processing this command .
    > >
    > > Any idea ?

    >
    > Yes, man ssh and man ssh_config and man sshd
    >
    > man sshd_config:
    > --snip--
    > LogLevel
    > Gives the verbosity level that is used when logging
    > messages
    > from ssh. The possible values are: QUIET, FATAL, ERROR,
    > INFO,
    > VERBOSE, DEBUG, DEBUG1, DEBUG2 and DEBUG3. The default is
    > INFO.
    > DEBUG and DEBUG1 are equivalent. DEBUG2 and DEBUG3 each
    > specify
    > higher levels of verbose output.
    > --snip--
    >
    >
    > man sshd:
    > --snip--
    > sshd rereads its configuration file when it receives a hangup
    > signal,
    > SIGHUP, by executing itself with the name and options it was
    > started
    > with, e.g., /usr/sbin/sshd.
    > --snip--
    >
    >
    > So, Undo the changes you did in /etc/tcp
    >
    > Then just,
    > echo "LogLevel DEBUG3" >> /etc/ssh/sshd_config
    > kill -1 `cat /etc/sshd.pid`
    >
    > Thats it.
    > New sessions get the new verbosity. Existing sessions stay alive and stay
    > the same. No killing, restarting, or suspending anything.
    > Certainly no rebooting!
    >
    > If you want to affect all ssh sessions immediately not just new ones, and/or
    > don't trust the pid file, or didn't know about the pid file,
    > do this:
    > ps -eopid,args |awk '($2~"sshd"){print $1}' |xargs kill -1
    >
    > You still haven't stopped or restarted anything or broken any existing
    > sessions or suspended new ones etc...
    >
    > But in your case, because you edited the sshd command line itself, at least
    > the top level sshd process needs to get killed and re-run, which means you
    > may have to be a little more invasive to undo that if you haven't put it
    > back already.
    > If you have put /etc/tcp back the way it was already then just ignore the
    > rest of this.
    >
    > This will kill the top level sshd process and optionanally all others too,
    > so don't be logged in via ssh yourself and don't do it if there are a lot of
    > users logged in.
    > It also interrupts new sessions from being able to start up briefly.
    >
    > /etc/tcp stop
    >
    > # pick only one of a b or c
    >
    > # a) this kills only the top level sshd, so only affects new sessions, using
    > the pid file
    > kill `cat /etc/sshd.pid`
    >
    > # b) this kills only the top level sshd process, using ps
    > ps -eopid,ppid,args |awk '($3~"sshd")&&($2==1){system("kill "$1)}'
    >
    > # c) this one kills all sshd processes
    > ps -eopid,args |awk '($2~"sshd"){print $1}' |xargs kill
    >
    > /etc/tcp start
    >
    > Even in this "more invasive" option you still don't reboot.
    >
    > Brian K. White -- brian@aljex.com -- http://www.aljex.com/bkw/
    > +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
    > filePro BBx Linux SCO FreeBSD #callahans Satriani Filk!


    Brian

    thanks a lot .

    It is very clear , I'll try it.

    Pablo


+ Reply to Thread