This project is read-only.

ForwardedPortRemote problem

Jul 19, 2012 at 4:32 PM


I have following code:    

var client = new SshClient("", "root", "mypass");
var port1 = new ForwardedPortRemote(8081, "", 80);

And I always get this exception: SystemArgumentException: BoundHost

I also tried to insert this code:

client.RunCommand("touch renci")
And I see renci file created in ~/ directory, so connection to server is definitely working correctly. Please help.

Jul 21, 2012 at 1:11 AM


Fro, the top of my head, since I can't look at a code right now, try use this:

var port1 = new ForwardedPortRemote("localhost", 8081, "", 80);

I think at some point we added check for valid bound port, but forgot to handle null case.


Also, try to download latest version, since I think I fixed this issue at some point, just don't remember where.


Hope it helps,




Jul 24, 2012 at 3:24 PM


I already have latest version, this is not solved. If you will go to issues you will see this bug. Maybe you can include fix in the next version. In the mean time your solution works perfectly.

Aug 10, 2012 at 2:49 PM



I just now found some time to look at it and using latest code and not providing bound host it still works fine.

What happens is it passes it as empty string, which I think system recognizes as localhost.


Can you please let me know if in the code that you using you have 2 ForwardedPortRemote constructors?