I am trying to use ssh in c# but getting below error.
No connection could be made because the target machine actively refused it.
using (var client = new SshClient("hostname", "userid", "pwd"))
{
client.Connect();
client.Disconnect();
}

Answers
Know the answer? Post it. Somebody with the same question will find it here.