3

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.

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?

4

2 に答える 2

3

http://www.example-code.com/csharp/sshTunnel_database.asp

于 2010-01-14T15:04:34.610 に答える
0
  1. SSHのパスワードを使用する必要がないようにキーを作成します。
  2. 適切な引数(TCP転送用)を使用して適切なSSHコマンドを実行します(puttyなどの外部EXEを呼び出す)
  3. 適切な接続設定を使用してください。
  4. 完了しました。
于 2010-01-14T15:07:48.957 に答える