在远程登录时绕过SSL验证的方法
//绕过SSL验证
ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);
public bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
{ // Always accept
Console.WriteLine("accept " + certificate.GetName()); return true;
} //总是接受