From owner-freebsd-questions@FreeBSD.ORG Mon Nov 9 19:45:24 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 129A5106566C for ; Mon, 9 Nov 2009 19:45:24 +0000 (UTC) (envelope-from peter@boosten.org) Received: from smtpq4.gn.mail.iss.as9143.net (smtpq4.gn.mail.iss.as9143.net [212.54.34.167]) by mx1.freebsd.org (Postfix) with ESMTP id BD5108FC1E for ; Mon, 9 Nov 2009 19:45:23 +0000 (UTC) Received: from [212.54.34.135] (helo=smtp4.gn.mail.iss.as9143.net) by smtpq4.gn.mail.iss.as9143.net with esmtp (Exim 4.69) (envelope-from ) id 1N7aAz-0006xd-Kp; Mon, 09 Nov 2009 20:45:21 +0100 Received: from [84.25.72.219] (helo=ra.egypt.nl) by smtp4.gn.mail.iss.as9143.net with esmtp (Exim 4.69) (envelope-from ) id 1N7aAy-0005Xx-NU; Mon, 09 Nov 2009 20:45:20 +0100 Received: from mbp.egypt.nl (mbp.egypt.nl [192.168.13.33]) by ra.egypt.nl (Postfix) with ESMTP id BC8A939847; Mon, 9 Nov 2009 20:45:18 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes From: Peter Boosten In-Reply-To: Date: Mon, 9 Nov 2009 20:45:18 +0100 Content-Transfer-Encoding: 7bit Message-Id: <8E0BC73D-5A7E-4AA7-A07B-A0F9959D5F3A@boosten.org> References: <4AF85FC9.10103@daleco.biz> To: patrick X-Mailer: Apple Mail (2.1076) X-ZiggoSMTP-MailScanner-Information: Please contact the ISP for more information X-ZiggoSMTP-MailScanner-ID: 1N7aAy-0005Xx-NU X-ZiggoSMTP-MailScanner: Found to be clean X-ZiggoSMTP-MailScanner-SpamCheck: geen spam, SpamAssassin (niet cached, score=-2.6, vereist 5, autolearn=not spam, BAYES_00 -2.60, SPF_PASS -0.00) X-ZiggoSMTP-MailScanner-From: peter@boosten.org X-Spam-Status: No Cc: freebsd-questions Subject: Re: Remote ssh tunnel in background or script? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2009 19:45:24 -0000 On 9 nov 2009, at 20:36, patrick wrote: > Check out /usr/ports/security/autossh > > autossh is a program to start a copy of ssh and monitor it, restarting > it as necessary should it die or stop passing traffic. > > The original idea and the mechanism were from rstunnel (Reliable SSH > Tunnel). With this version the method changes: autossh uses ssh to > construct a loop of ssh forwardings (one from local to remote, one > from remote to local), and then sends test data that it expects to > get back. (The idea is thanks to Terrence Martin.) > > WWW: http://www.harding.motd.ca/autossh/ > You don't need additional software for that: you can easily spawn a ssh session from ttys, which re-establishes itself when it fails: http://old.nabble.com/Re%3A-mysql-connection-through-ssl-tunnel-p20077382.html -- http://www.boosten.org