EldoS | Feel safer!

Software components for data protection, secure storage and transfer

TElSSHRemotePortForwarding on Compact Framework 2

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
Posted: 05/15/2014 03:48:21
by Jean Philippe (Basic support level)
Joined: 05/15/2014
Posts: 10


I'm trying to use TElSSHRemotePortForwarding on a windows CE 5.0, with compact framework 2.0 compatible libraries without success. The connection is immediately closed, after successful authentication (forwarding_OnClose called).

By running the same come on .NET 2.0 (not compact), it succeeds to forward the port.

There is no sample for CF. Is there anything specific to know ?

Here is my relevant code:

forwarding = new TElSSHRemotePortForwarding();
forwarding.Address = null;
forwarding.ClientHostname = null;
forwarding.ClientUsername = null;
forwarding.CompressionLevel = 0;
forwarding.DestHost = null;
forwarding.DestPort = 0;
forwarding.ForceCompression = false;
forwarding.ForwardedHost = "";
forwarding.ForwardedPort = 0;
forwarding.KeyStorage = null;
forwarding.Password = null;
forwarding.Port = 0;
forwarding.SocksAuthentication = 0;
forwarding.SocksPassword = null;
forwarding.SocksPort = 0;
forwarding.SocksResolveAddress = false;
forwarding.SocksServer = null;
forwarding.SocksUserCode = null;
forwarding.SocksVersion = 0;
forwarding.SoftwareName = "SSHBlackbox.8";
forwarding.SynchronizeGUI = false;

forwarding.UseProxySettingsForForwardedConnections = false;
forwarding.Username = null;
forwarding.UseSocks = false;
forwarding.UseWebTunneling = false;
forwarding.Versions = ((short)(2));
forwarding.WebTunnelAddress = null;
forwarding.WebTunnelPassword = null;
forwarding.WebTunnelPort = 0;
forwarding.WebTunnelUserId = null;
forwarding.OnKeyValidate += new SBSSHCommon.TSSHKeyValidateEvent(forwarding_OnKeyValidate);
forwarding.OnAuthenticationFailed += forwarding_OnAuthenticationFailed;
forwarding.OnConnectionOpen += new SBSSHForwarding.TSBSSHConnectionEvent(forwarding_OnConnectionOpen);
forwarding.OnClose += new SBUtils.TNotifyEvent(forwarding_OnClose);
forwarding.OnConnectionError += new SBSSHForwarding.TSBSSHConnectionErrorEvent(forwarding_OnConnectionError);
forwarding.OnConnectionClose += new SBSSHForwarding.TSBSSHConnectionEvent(forwarding_OnConnectionClose);
forwarding.OnAuthenticationSuccess += new SBUtils.TNotifyEvent(forwarding_OnAuthenticationSuccess);
forwarding.OnError += new SBSSHCommon.TSSHErrorEvent(forwarding_OnError);
forwarding.OnConnectionChange += new SBSSHForwarding.TSBSSHConnectionEvent(forwarding_OnConnectionChange);
forwarding.OnOpen += new SBUtils.TNotifyEvent(forwarding_OnOpen);

forwarding.Address = "-----";
forwarding.Port = 22;;
forwarding.ForwardedHost = "";
forwarding.ForwardedPort = 8080;
forwarding.DestHost = "";
forwarding.DestPort = 8080;
forwarding.Username = "root";
forwarding.Password = "-------";
Posted: 05/15/2014 05:02:15
by Jean Philippe (Basic support level)
Joined: 05/15/2014
Posts: 10

After more investigation on a real device, I'm getting SSH ERROR 502.

Seems to be related to :
502 (0x01F6) SSH forward disallowed

But with the same server, it works with .NET lib and same code (not CF).

Is the .NET CF compatible with port forwarding ?

Thank you for your help in advance,

Posted: 05/15/2014 05:32:32
by Vsevolod Ievgiienko (Team)

Thank you for contacting us.

First of all you should check logs of the server as it can happen that server simply doesn't allow your device IP.
Posted: 05/15/2014 06:41:49
by Jean Philippe (Basic support level)
Joined: 05/15/2014
Posts: 10

I didn't find any access denied by ip. I can find authentication error when I have the wrong password.

I tested with version 9 and 11, same issue.

If I use the compact framework library on a .NET application (it usually works), I have the same problem. (just replace the .NET lib by the .NET CF)
Posted: 05/15/2014 13:28:20
by Jean Philippe (Basic support level)
Joined: 05/15/2014
Posts: 10

Should I create a support ticket for this issue ?
I have a temporary license key now, but same problem.

Thank you,

Posted: 05/16/2014 02:50:02
by Vsevolod Ievgiienko (Team)

Sorry for the delayed answer. We tried to reproduce the problem but connection establishes without any problems. I'm moving this topic to the helpdesk. Please post your project there - we'll try to reproduce the problem with it.
Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.



Topic viewed 660 times

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


Back to top

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

Got it!