title: "Host key wasn't verified!" when connecting using WinSCP .NET assembly
body: <p>I'm trying to establish a connection to SFTP server with following code, I'll receive this error message <em>"Host key wasn't verified!"</em>.</p>
  
  
  
  <pre class="lang-csharp prettyprint-override"><code>SessionOptions so = new SessionOptions { 
      Protocol = Protocol.Sftp, 
      HostName = "xx.xx.xx.xx", 
      UserName = "usera",
      Password = "user123",
      SshHostKeyFingerprint = "2048 78:1d:67:f9:89:f5:ea:8e:28:84:68:04:f6:50:e7:ea"
  };
  
  using (Session s = new Session())
  {
      s.Open(so);
  }
  </code></pre>
  
  <p>But if I establish a connection using following code, I'm able to connect.</p>
  
  <pre class="lang-csharp prettyprint-override"><code>System.Diagnostics.Process winscp = new System.Diagnostics.Process();
  winscp.StartInfo.FileName = "winscp.com";
  winscp.StartInfo.UseShellExecute = false;
  winscp.StartInfo.CreateNoWindow = true;
  winscp.StartInfo.RedirectStandardOutput = true;
  winscp.StartInfo.RedirectStandardInput = true;
  winscp.Start();
  
  winscp.StandardInput.WriteLine("open sftp://usera:user123@xx.xx.xx.xx");
  winscp.StandardInput.Close();
  </code></pre>
  
  <p>I'm so curious to know what I have done wrong in the first method?</p>