Does this library support SSH port forwarding?

Oct 21, 2010 at 4:50 AM

as from title.

Coordinator
Oct 21, 2010 at 1:40 PM

Currently not but it can be extended.

Can you give me a usage example and I`ll try to implement it?

 

Thanks,

Oleg

Oct 21, 2010 at 4:35 PM

This would be equivalent to implement the two SharpSSH APIs:

  • setPortForwardingR
  • setPortForwardingL

It creates a tunnel, the same thing that you can do with the standard SSH command line syntax, for example:

ssh -R 873:localhost:873

Tunneling, is one of the best features in SSH. I will gladly help to test this thouroghly.

Thanks

Coordinator
Oct 21, 2010 at 6:02 PM

ok, no problem, thanks.

 

I then will start working on this soon, probably next week already and will let you know as soon as it is ready so you could test it.

Thanks,

Oleg

Coordinator
Oct 28, 2010 at 1:30 PM

Hi Paperino,

 

I am working on implemeting th e -L option now. 

I almost done and trying to check performance and stability issues that I can find so had couple questions.

 

Do you use -L option before?

If yes, did it return correct results?

I my tests I using apache server to allow to download file but using Sharp SSH library I only get 3072 bytes instead of 884830 so was wondering if you have similar issue?

 

I will check in this code soon so you could take a look and test, I just want to refactor session menagment since it apears that the 10 session limit per connection is only applies to "server-session" type sessions.

 

Thanks,

Oleg

Oct 28, 2010 at 3:30 PM

Thanks Oleg. No, I am using the -R option for opening a port on a PC inside a firewall.

Coordinator
Nov 4, 2010 at 8:48 PM

Hi,

 

I just checked in a new code which include PortForawrding feature.

 

I also change the way you use a library a little bit so now instead of creating Shell class directly you need to create SshClient class which will have all functionality for Shell, Sftp and port forwarding.

Look at PortForwardingTest file too see how to use this feature.

 

Please let me now if you have any problems or questions as well if you find any bugs.

 

Thanks,

Oleg