Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Secure-Shell
[Top] [All Lists]

Ensuring remote ssh process has terminated

Subject: Ensuring remote ssh process has terminated
Date: Mon, 16 Jul 2007 12:26:00 -0400
I am curious about some behavior in sshd that I consider to be a bug
 
I have tried this on openssh-4.2p1-fc4.10 and openssh-4.3p2-16.el5 and
the behavior is the same in both places.

The child process spawned by the sshd does not get killed when the sshd
terminates and the process has been adopted by init. For example:

        $ ssh localhost sleep 100
        <Ctrl+C>
        Killed by signal 2.

        $ ps -C sleep -o cmd,pid,ppid
        CMD                           PID  PPID
        sleep 100                   13550     1

This behavior is not intuitive - rsh doesn't behave this way, for
example. If I force tty allocation with '-t', then the child process
will receive SIGINT and terminate. However, this is not an option if I
want to run the process with no standard input. The ssh client will not
allocate a pseudoterminal in this instance.
 
Is it possible to ensure, without allocating a pseudoterminal, that the
remote process will terminate when the client terminates?
 
Thanks,
John
 

<Prev in Thread] Current Thread [Next in Thread>
  • Ensuring remote ssh process has terminated, Fusco, John (GE Healthcare) <=