Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: Port Forwarding problem

$
0
0
private SshClient SshC = new SshClient("Host", Port, "User", "Password");
private ForwardedPortLocal LPF1, LPF2, LPF3, RgF1, RqF1, RqF2, RqF3, MDB;


    SshC.Connect();
    MDB = new ForwardedPortLocal("127.0.0.1", 3306, "0.0.0.0", 3306);
    SshC.AddForwardedPort(MDB);
    MDB.Start();

    LPF1 = new ForwardedPortLocal("127.0.0.1", 8100, "0.0.0.0", 8100);
    SshC.AddForwardedPort(LPF1);
    LPF1.Start();

    LPF2 = new ForwardedPortLocal("127.0.0.1", 8008, "0.0.0.0", 8008);
    SshC.AddForwardedPort(LPF2);
    LPF2.Start();

    LPF3 = new ForwardedPortLocal("127.0.0.1", 8010, "0.0.0.0", 8010);
    SshC.AddForwardedPort(LPF3);
    LPF3.Start();

    RqF1 = new ForwardedPortLocal("127.0.0.1", 8014, "0.0.0.0", 8014);
    SshC.AddForwardedPort(RqF1);
    RqF1.Start();

    RqF2 = new ForwardedPortLocal("127.0.0.1", 8040, "0.0.0.0", 8040);
    SshC.AddForwardedPort(RqF2);
    RqF2.Start();"
When I switch from one port to another in my application I recieve the Following Error
Exception:Thrown: "An existing connection was forcibly closed by the remote host" (System.Net.Sockets.SocketException)
A System.Net.Sockets.SocketException was thrown: "An existing connection was forcibly closed by the remote host"

Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>