title: SftpClient using Url instead of IP as host
body: <p>I am using the following code to upload a file to an <code>sFTP</code> server. I have done a test upload using <em>FileZilla</em> and the file is uploaded successfully.</p>
  
  <pre><code>try
  {
      var client = new SftpClient(host, port, username, password);
      client.Connect();
      client.ChangeDirectory(workingDir);
      var listDirectory = client.ListDirectory(workingDir);
      foreach (var file in files)
      {
          var fileStream = new FileStream(file, FileMode.OpenOrCreate);
          client.BufferSize = 4 * 1024; // bypass payload error large files
          client.UploadFile(fileStream, Path.GetFileName(file));
          Log.Info(string.Format("File [{0}] upload complete",file));
      }
  
  }
  catch (Exception ex)
  {
      Log.Error(ex.Message);
  }
  </code></pre>
  
  <p>But in the code above, I cannot seem to get the upload done because I get the following error:</p>
  
  <blockquote>
    <p>No such host is known</p>
  </blockquote>
  
  <p>And that's maybe because I am using the Url value of my host instead of IP? (I have done a test with another FtP server using IP and that also seems to be working) I'm wondering if that's the case? If so, is there a way to let <code>SftpClient</code> (<a href="https://www.nuget.org/packages/SSH.NET/" rel="nofollow noreferrer">Ssh.Net</a>) handle the Url?</p>