List forwarded connections --> pid? - SSH

This is a discussion on List forwarded connections --> pid? - SSH ; Hi, How can I get the pid of the process which leaves the logout hanging? > logout ~? .... ~# - list forwarded connections ~# The following connections are open: #0 client-session (t4 r0 i0/0 o0/0 fd 6/7 cfd -1) ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: List forwarded connections --> pid?

  1. List forwarded connections --> pid?

    Hi,

    How can I get the pid of the process which leaves
    the logout hanging?

    > logout

    ~?
    ....
    ~# - list forwarded connections
    ~#
    The following connections are open:
    #0 client-session (t4 r0 i0/0 o0/0 fd 6/7 cfd -1)

    Is it possible to get the pid of the process? I can guess
    by it by opening a second ssh and doing "pstree", but a reliable
    way would be better.

    Thomas

    --
    Thomas GŁttler, http://www.thomas-guettler.de/
    E-Mail: guettli (*) thomas-guettler + de
    Spam Catcher: niemand.leermann@thomas-guettler.de


  2. Re: List forwarded connections --> pid?


    > Hi,
    > How can I get the pid of the process which leaves
    > the logout hanging?
    >
    > > logout

    > ~?
    > ...
    > ~# - list forwarded connections
    > ~#
    > The following connections are open:
    > #0 client-session (t4 r0 i0/0 o0/0 fd 6/7 cfd -1)


    It's isn't clear to me from your post whether you realize, that this
    particular output does not correspond directly to some process which is
    preventing the connection from terminating. It is the exec channel (login
    session) you've been using all along, which is still open even though you
    have exited the shell. Try the same SSH escape command before typing
    "logout"; you'll see the same thing.

    The issue is probably this one:

    http://www.snailbook.com/faq/background-jobs.auto.html

    From this you can see that pstree may not help you find it, since the
    culprit process may have disassociated from your terminal and process
    group.

    --
    Richard Silverman
    res@qoxp.net


+ Reply to Thread