Re: How to kill a background ssh process?
- From: "Richard E. Silverman" <res@xxxxxxxx>
- Date: 17 Aug 2006 20:35:34 -0400
"CP" == clodoaldo pinto <clodoaldo.pinto@xxxxxxxxx> writes:
CP> I need to have a background ssh tunnel. It is setup like this: $
CP> ssh -n -N -C -o "StrictHostKeyChecking no" -L 5433:localhost:5432
CP> 1.2.3.4 &
CP> It needs to eventually be killed and restarted with another server
CP> IP. What I'm doing is sending it a SIGTERM and it works but
CP> leaves a defunct process. This is not too big a deal but I want it
CP> clean.
CP> I have read from the man that a ~ followed by a . from stdin
CP> closes the connection, but the manual also states that the -n
CP> option must be used when ssh is to run in the background.
CP> What is the best approach?
Try using -f instead of having the shell put it under job control with "&".
CP> Regards, Clodoaldo PInto
--
Richard Silverman
res@xxxxxxxx
.
- References:
- How to kill a background ssh process?
- From: clodoaldo . pinto
- How to kill a background ssh process?
- Prev by Date: Re: ssh dictionary attacks
- Next by Date: Re: McAfee and CygWin SSH
- Previous by thread: How to kill a background ssh process?
- Next by thread: Re: How to kill a background ssh process?
- Index(es):