How to kill a background ssh process?
- From: clodoaldo.pinto@xxxxxxxxx
- Date: 17 Aug 2006 17:23:16 -0700
I need to have a background ssh tunnel.
It is setup like this:
$ ssh -n -N -C -o "StrictHostKeyChecking no" -L 5433:localhost:5432
1.2.3.4 &
It needs to eventually be killed and restarted with another server IP.
What I'm doing is sending it a SIGTERM and it works but leaves a
defunct process. This is not too big a deal but I want it clean.
I have read from the man that a ~ followed by a . from stdin closes the
connection, but the manual also states that the -n option must be used
when ssh is to run in the background.
What is the best approach?
Regards, Clodoaldo PInto
.
- Follow-Ups:
- Re: How to kill a background ssh process?
- From: Darren Tucker
- Re: How to kill a background ssh process?
- From: Richard E. Silverman
- Re: How to kill a background ssh process?
- Prev by Date: Re: McAfee and CygWin SSH
- Next by Date: Re: ssh dictionary attacks
- Previous by thread: McAfee and CygWin SSH
- Next by thread: Re: How to kill a background ssh process?
- Index(es):
Relevant Pages
|