Comments: ** Comment from web user: Darkoperator **
C# I used for testing that slows down to a crawl and then times out connections.
'''
AuthenticationMethod[] authenticationMethods =
{
new PasswordAuthenticationMethod("root", "password")
};
using (var client = new SshClient(new ConnectionInfo("192.168.1.217", "root", authenticationMethods)))
{
Console.WriteLine("Connecting");
client.Connect();
if (client.IsConnected)
{
Console.WriteLine("Connection was succesful");
}
else
{
Console.WriteLine("Not connected");
return;
}
var frwport = new ForwardedPortDynamic("localhost", 8080);
client.AddForwardedPort(frwport);
Console.WriteLine("Starting Socks Proxy at port 8080");
frwport.Start();
Console.ReadLine();
Console.WriteLine("Stopping port forwarding");
frwport.Stop();
Console.WriteLine("Disconnecting");
client.Disconnect();
}
'''