title: Setting the extended file attributes using SSH.NET SftpClient
body: <p>I am trying to use the extended file attribute to store some information after I uploaded a file into remote machine (Ubuntu 16.04 LTS) from Windows using Renci SSH.NET SFTP library. But the attributes are not getting preserved?</p>
  
  <p>This how I am trying to set the extended attributes</p>
  
  <pre><code>SftpFileAttributes fileAttrs = sftpClient.GetAttributes(remoteFilePath);
  IDictionary&lt;string, string&gt; additionalAttrs = new Dictionary&lt;string, string&gt;();
  additionalAttrs.Add(new KeyValuePair&lt;string, string&gt;("user.from", "abc"));
  additionalAttrs.Add(new KeyValuePair&lt;string, string&gt;("user.to", "xyz"));
  fileAttrs =
      new SftpFileAttributes(
          fileAttrs.LastAccessTime, fileAttrs.LastWriteTime, fileAttrs.Size,
          fileAttrs.UserId, fileAttrs.GroupId, 222, additionalAttrs);
  sftpClient.SetAttributes(remoteFilePath, fileAttrs);
  </code></pre>
  
  <p>So, can you help me how to approach this problem? <strong>Note that</strong>: The remote machine is configured to allow only SFTP connection for security reason.</p>