title: Copying or moving a remote file using SSH.NET with C#
body: <p>I know that I can upload and download files from/to a SFTP server using <code>SftpClient</code> class of SSH.NET library but I am not sure how can this class be used for copying or moving a remote file on the SFTP server. I also did not find relevant material on internet. How can i copy or move a remote file from directory A to directory B, using SSH.NET library and C#.</p>
  
  <p><strong>Update:</strong>
  I also tried experimenting with <code>SshClient</code> class using the below code but it does nothing, neither any error nor any exception.</p>
  
  <pre><code>ConnectionInfo ConnNfo = new ConnectionInfo("FTPHost", 22, "FTPUser",
  new AuthenticationMethod[]{
  
     // Pasword based Authentication
     new PasswordAuthenticationMethod("FTPUser","FTPPass")
     }                
     );
  
  using (var ssh = new SshClient(ConnNfo))
  {
      ssh.Connect();                
      if (ssh.IsConnected)
      {                    
           string comm = "pwd";
           using (var cmd = ssh.CreateCommand(comm))
           {
              var returned = cmd.Execute();
              var output = cmd.Result;
              var err = cmd.Error;
              var stat = cmd.ExitStatus;
           }
       }
     ssh.Disconnect();
  }
  </code></pre>
  
  <p>On Visual Studio console, i get the below output.</p>
  
  <blockquote>
    <p>*SshNet.Logging Verbose: 1 : SendMessage to server 'ChannelRequestMessage': 'SSH_MSG_CHANNEL_REQUEST : #152199'.</p>
    
    <p>SshNet.Logging Verbose: 1 : ReceiveMessage from server:
    'ChannelFailureMessage': 'SSH_MSG_CHANNEL_FAILURE : #0'.*</p>
  </blockquote>