[thelist] plink from unix and keepalives

Ken Schaefer Ken at adOpenStatic.com
Tue Oct 11 04:31:28 CDT 2005


SQL Server supports the use of TLS if you connect over TCP/IP (TLS is
basically SSL). Would that be an alternative to SSH? 

Another thought was IPSec, but I don't know how easy that is to setup an
IPSec connection between a Linux and Windows box.

Not really the answer you're looking for, but if you can't get the SSH tunnel
stable, maybe something else might be an option.

Cheers
Ken

> -----Original Message-----
> From: thelist-bounces at lists.evolt.org [mailto:thelist-
> bounces at lists.evolt.org] On Behalf Of Juha Suni
> Sent: Tuesday, 11 October 2005 7:06 PM
> To: thelist at lists.evolt.org
> Subject: [thelist] plink from unix and keepalives
> 
> Hi.
> 
> Our web application running on a linux-box connects to a remote (windows
> MS
> SQL) database through an ssh tunnel I have set up with plink running from
> the web server. The connection is ok, and the database connections work as
> expected.
> 
> Command line I use to open the ssh tunnel is (connection details bogus):
> "plink -N -pw password -L 1234:remotename:4321 login at 192.168.0.1
> >/dev/null
> 2>&1 &"
> 
> Lately we have run into problems with the ssh tunnel being unstable and
> disconnecting. So far I have been running a simple cronjob to regulary
> check
> if the ssh connection script is still running, and restart it if
> necessary.
> Since there are timeouts involved and I cannot have the cronjob running
> every second, there are occasions when the ssh tunnel is down when the
> webapp tries to use the database through it.
> 
> I am suspecting the problem has more to do with keepalives and ssh-
> sessions
> timing out than with actual network failures.
> 
> I have googled myself to death but have not found an answer to my problem:
> 
> How do I define keepalive settings in unix plink?
> 
> According to the putty 0.58 (which I am using to create the ssh tunnel)
> changelog:
> (http://www.chiark.greenend.org.uk/~sgtatham/putty/changes.html)
> "Bug fix: keepalives are now supported everywhere. (Previously they were
> supported by Windows GUI PuTTY, but were missing in Plink, PSFTP and the
> Unix port.)"
> 
> This would suggest that keepalives CAN be set with the command line plink.
> However, neither the manual or any other resource on the net seems to give
> a
> clue as to how this should be accomplished. All I would need is the
> command
> line option for this.
> 
> Alternatively, as a second hand option, I am open to any other suggestions
> on opening an ssh tunnel from the linux box to the database server.
> Requirements are that it is an easy to run script that requires no user
> interaction, so it can be run behind the scenes, and its status can be
> checked with a script so that I can reinitiate the tunnel automatically if
> it goes down.
> 
> After all, I thought getting the database connection from a LAMP setup to
> work with a MS SQL server would be a pain in the ass. After some upgrades
> it
> proved to work flawlessly. And now I'm stuck with a simple ssh tunnel that
> just cant stay alive as well as it should.
> 
> All help will be greatly appreciated.


More information about the thelist mailing list