Comments: ** Comment from web user: Darkoperator **
```
AuthenticationMethod[] authenticationMethods =
{
new PasswordAuthenticationMethod("root", "8dbjvu6b")
};
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();
}
```