EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SSH Remote Port Forwarding

Posted: 05/29/2007 22:43:47
by j monty (Basic support level)
Joined: 05/29/2007
Posts: 2

I'm working from the SSH Remote Port Forwarding Demo application.

I can't seem to find a way to remove the Remote Tunnel after it has been established.

The sample code does not provide this information, nor does the documentation (at least that I could find).

I attempted to create my own 'Close()' method on the SshForwarding class provided in the sample, where I close the socket and dispose of it, then finally set the SshForwarding class to null. However, if any further connections come in on this port, the SshForwarding class, now null, is still trying to be used to handle these connections.

I need to be able to create and shut down the ports the Remote Tunnel creates on the server. Is there an easy way to do this?


Error receiving data: System.NullReferenceException: Object reference not set to an instance of an object.
at SBSSHCommon.TElCustomSSHTunnel.AddConnection(TElSSHTunnelConnection Conn)
at SBSSHClient.TElSSHClient.SSH2CreateChannel(TElCustomSSHTunnel Tunnel, TElSSHClientTunnelConnection& Connection)
at SBSSHClient.TElSSHClient.SSH2ParseServerChannelOpen(Byte[] Buffer, Int32 Size)
at SBSSHClient.TElSSHClient.SSH2ParseOnConnectionLayer(Byte[] Buffer, Int32 Size)
at SBSSHClient.TElSSHClient.SSH2ParseOnTransportLayer(Byte[] Buffer, Int32 Size)
at SBSSHClient.TElSSHClient.AnalyseBuffer()
at SBSSHClient.TElSSHClient.DataAvailable()
at SshClient.OnClientSocket_Receive(IAsyncResult ar) in SshClient.cs:line 663
Posted: 05/29/2007 22:49:48
by j monty (Basic support level)
Joined: 05/29/2007
Posts: 2

One more important point I forgot to mention: I don't want to close the main SSH connection or any other tunnels. I need to be able to choose as few or as many Remote Tunnels to close with out affecting other Reverse Tunnels.

Thanks again.
Posted: 05/30/2007 01:19:07
by Ken Ivanov (Team)

It is not possible with current build of SecureBlackbox, sorry. However, there's a corresponding entry in our to do list, so this feature will be implemented in one of the future build updates.

The approach you tried will not work, since forwarding termination requires specific handling by SSH protocol.



Topic viewed 2225 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!