Quantcast
Viewing all articles
Browse latest Browse all 1729

New Post: No such File or Directory

Any luck with this one? I too am finding the library WONDERFUL! THANK YOU! SSH works like a charm. Now I would like to copy a result that I redirected from the SSH command:
~/command --some_args >~/result.txt
Now via SCP, I say:
//The Configure and Connected are some extensions I cooked up to help it out by convention.
using (var client = new ScpClient(Host, User, Password).Configure().Connected())
{
  using (var fs = new FileStream("local.txt", FileMode.Create, FileAccess.Write, FileShare.Read))
  {
    //TODO: May hook up Downloading event (in fact I am, but for sake of example, the point is moot.
    client.Download("~/result.txt", fs);
    //ScpException: scp: ~/result.txt: No such file or directory
  }
}
However, like my colleague here, getting the same issue. It's there! I checked via Ssh. Is there a trick to making the Scp client work?

I could run the following and pick up the file: scp root@10.10.0.1:~/result.txt local.txt

Regards,

Michael Powell

Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>