问题描述
我正在使用C#在ETL上工作,在ETL中,该数据是从需要SSH隧道进行连接的远程MySQL数据库中提取数据的.我目前可以正常工作,这样我可以先使用PuTTY手动创建SSH隧道,然后通常使用MySqlConnection对象等以编程方式连接到数据库.
I'm working on an ETL using C# in which extracts data from a remote MySQL database that requires an SSH tunnel to connect. I currently have it working such that I first create my SSH tunnel manually using PuTTY and then programmaticly connect to the database normally using a MySqlConnection object, etc.
如何使用C#/.NET以编程方式创建SSH隧道?是否有任何库可以做到这一点和/或.NET框架本身是否内置任何可以帮助我做到这一点的东西?
How can I programmatically create the SSH tunnel using C#/.NET? Are there any libraries for doing this and/or is anything built into the .NET framework itself that would aid me in doing this?
推荐答案
http://www.example-code.com/csharp/sshTunnel_database.asp
这篇关于如何以编程方式连接到需要SSH隧道的远程数据库服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!