pb with remote command cleanup
- From: Mat <matthieu.hautreux@xxxxxxxxxxx>
- Date: Tue, 19 Jun 2007 22:26:16 +0200
Hi,
I have a cleanup problem when I remote execute a command using ssh. If I kill ssh client during remote execution (with ctrl-C or by closing the terminal) then remote command still exists.
Here is what's happening :
[mat@myfirsthost ~]$ ssh mysecondhost sleep 3600
Killed by signal 2.
[mat@myfirsthost ~]$ ssh mysecondhost ps -fu mat | grep sleep
mat 3570 1 0 22:04 ? 00:00:00 sleep 3600
mat 3685 3492 0 22:09 pts/1 00:00:00 grep sleep
Is there a way for sshd to kill all childs when connection is closed/lost ? Maybe there is an option in sshd_config that can do it but I didn't find any.
To cope with this probleme, I can use "-t" to force remote tty, and then child are killed but I think it's not a good solution. Furthermore, I can't assure that all users do remote execution using this parameter. As a result, there is a lot of useless resident program that run on hosts and use cpu cycles for nothing.
Thank you in advance
Mat
.
- Follow-Ups:
- Re: pb with remote command cleanup
- From: Darren Dunham
- Re: pb with remote command cleanup
- Prev by Date: SSH Setup
- Next by Date: Re: pb with remote command cleanup
- Previous by thread: SSH Setup
- Next by thread: Re: pb with remote command cleanup
- Index(es):
Relevant Pages
|
|