EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Multi-Port Forwarding

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
#23604
Posted: 02/21/2013 14:04:47
by Ken Ivanov (EldoS Corp.)

We realize your goal. Please use the methods and properties I referenced above (AddTunnel() and Tunnels[]) to arrange as many forwardings as you need. As long as you run them through that very same TElSSHLocalPortForwarding object, only one SSH connection is used.
#23605
Posted: 02/21/2013 14:06:43
by Ken Ivanov (EldoS Corp.)

While VS2010 works with any .NET version up to 4.0, .NET 4 is native for it. Please try specifying assemblies from the NET_40 subdirectory and check if you are able to compile and run the sample.
#23606
Posted: 02/21/2013 14:08:14
by Carlton  (Basic support level)
Joined: 02/21/2013
Posts: 45

How do I set Port and SSH Version

SsHC = new SBSSHClient.TElSSHClient();
SsHC.ClientHostName = "Hostname";
SsHC.ClientUserName = "user";
SsHC.Password = "password";
#23607
Posted: 02/21/2013 14:09:07
by Carlton  (Basic support level)
Joined: 02/21/2013
Posts: 45

also I don't see a connect or connection only method
#23608
Posted: 02/21/2013 14:10:44
by Carlton  (Basic support level)
Joined: 02/21/2013
Posts: 45

My Project is set for .NET 2.0 and I selected the assemblies out of the .NET 2.0 directory
#23609
Posted: 02/21/2013 14:36:17
by Carlton  (Basic support level)
Joined: 02/21/2013
Posts: 45

"

#23604
Created: 02/21/2013 15:04:47
by Ken Ivanov (EldoS Corp.)

Name Quote
We realize your goal. Please use the methods and properties I referenced above (AddTunnel() and Tunnels[]) to arrange as many forwardings as you need. As long as you run them through that very same TElSSHLocalPortForwarding object, only one SSH connection is used. "



I don't see AddTunnel()

this is what I have so far

Code
public Class   CHDR
{
           private TElSSHLocalPortForwarding ForWarding, LPF1, LPF2, LPF3, RqF1, RqF2, RqF3, MDB;
        private SBSSHClient.TElSSHClient SsHC;
     // other declaration

public CHDR(ref bool ReDoConnection)
{

            //
            // TODO: Add constructor logic here
            //
            SBUtils.Unit.SetLicenseKey("AF47...A57A");
            
            RedoDbConnection = RedoConnection;
            this.components = new System.ComponentModel.Container();
            this.timer = new System.Windows.Forms.Timer(this.components);
            //
            // timer
            //
            this.timer.Enabled = true;
            this.timer.Interval = 10;
            this.timer.Tick += new System.EventHandler(this.timer_Tick);
            
            initSsHC();

}

        private void initSsHC()
        {
            ForWarding.Address = "RemoteSSHHostName";
            ForWarding.Port = 22;
            ForWarding.ForwardedHost = "localhot";
            ForWarding.ForwardedPort = 3308;
            ForWarding.DestHost = "RemoteServiceHostName";
            ForWarding.DestPort = 3306;
            ForWarding.Username =  "RemoteSSHHost-Username";
            ForWarding.Password = "RemoteSSHHost-Password";
            ForWarding.Open();
            
           }

}
#23610
Posted: 02/21/2013 14:36:55
by Ken Ivanov (EldoS Corp.)

In order,

1) Use TElSSHLocalPortForwarding component and its Address and Port properties to set the SSH server parameters.

2) Use Open() method.

3) Please re-check the target framework version of your project. A side question - are you able to compile and run it? If you are, the issue might be caused by a glitch in VS IDE.
#23611
Posted: 02/21/2013 14:40:54
by Ken Ivanov (EldoS Corp.)

4) Use the below syntax for adding tunnels:

Code
                int tunnelIdx = forwarding.AddTunnel();
                forwarding.get_Tunnels(tunnelIdx).AutoOpen = true;
                forwarding.get_Tunnels(tunnelIdx).DestHost = "OtherRemoteServiceName";
                forwarding.get_Tunnels(tunnelIdx).DestPort = "OtherRemoteServicePort";
                forwarding.get_Tunnels(tunnelIdx).ForwardedHost = "localhost";
                forwarding.get_Tunnels(tunnelIdx).ForwardedPort = 33099;
#23612
Posted: 02/21/2013 14:42:02
by Carlton  (Basic support level)
Joined: 02/21/2013
Posts: 45

How do I add additional Tunnels to the one that I just created above.

Do I need to used the Server dll instead of the Client dll
#23613
Posted: 02/21/2013 14:49:06
by Ken Ivanov (EldoS Corp.)

See my reply above.
Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.

Reply

Statistics

Topic viewed 13909 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!