相关疑难解决方法(0)

Downloading a directory using SSH.NET SFTP in C#

I am using Renci.SSH and C# to connect to my Unix server from a Windows machine. My code works as expected when the directory contents are only files, but if the directory contains a folder, I get this

Renci.SshNet.Common.SshException: 'Failure'

这是我的代码,我如何更新它以下载目录(如果存在)

private static void DownloadFile(string arc, string username, string password)
{
    string fullpath;
    string fp;
    var options = new ProgressBarOptions
    {
        ProgressCharacter = '.',
        ProgressBarOnBottom = true
    };

    using (var sftp = new SftpClient(Host, username, password))
    {
        sftp.Connect();
        fp = …
Run Code Online (Sandbox Code Playgroud)

.net c# sftp ssh.net

7
推荐指数
1
解决办法
2万
查看次数

标签 统计

.net ×1

c# ×1

sftp ×1

ssh.net ×1