//ssh
string login = "";
string password = "";
string ip = "";
string port = "22";
//----------------------------
try
{
var client = new SshClient(ip, int.Parse(port), login, password);
client.Connect();
if (client.IsConnected)
{
var a = client.RunCommand("pwd").Result.ToString();
}
}
catch (Exception ex)
{
throw new Exception(ex.Message);
}