SSH.NET - Message Type 80 Invalid

I have the following code fragment that is trying to connect to an SFTP server built using OpenSSH (the server works because I was able to successfully connect to this FTP through the WinSCP client):

ConnectionInfo ConnNfo = new ConnectionInfo("127.0.0.1", 22, "usertest",
    new AuthenticationMethod[]{

        // Pasword based Authentication
        new PasswordAuthenticationMethod("usertest","usertest"),
    }
);

// Upload A File
using (var sftp = new SftpClient(ConnNfo))
{
    sftp.Connect();
    sftp.ChangeDirectory(@"/C:/IISFTP/");
    using (var uplfileStream = File.OpenRead(uploadfn))
    {
        sftp.UploadFile(uplfileStream, uploadfn, true);
    }
    sftp.Disconnect();
}

When calling a string sftp.Connect(), the following exception occurs:

Message Type 80 Invalid

Why is this happening? How to connect to my SFTP server using SSH.NET?

thank

+4
source share
1 answer

Message 80 means SSH_MSG_GLOBAL_REQUEST.

OpenSSH SSH.

/ . SSH.NET SSH_MSG_GLOBAL_REQUEST, .

, , OpenSSH (, hostkeys-prove-00@openssh.com) .

​​ SSH.NET 2016.0.0-beta1. . № 8 a1f46d4.


Session.cs Session.Connect() , :

RegisterMessage("SSH_MSG_GLOBAL_REQUEST");

, :

RegisterMessage("SSH_MSG_USERAUTH_BANNER");

+7

All Articles