I get an error "bad packet length xxxxx" when retrieving some sFTP sub directory listings. My connection is successful. FileZilla ftp client (default settings) has exact same issue with same dir's, but CoreFTP Lite (default settings) can list all dir's easily. If I move out a few files then I can list the sub directory's contents.
I heard it is because the sFTP server allows BOM as optional or something...
Are there any workarounds with SSH.NET C# library (latest version from https://sshnet.codeplex.com/).
I heard it is because the sFTP server allows BOM as optional or something...
Are there any workarounds with SSH.NET C# library (latest version from https://sshnet.codeplex.com/).
using (var sftp = new SftpClient(s.Host, s.UserName, s.Password))
{
foreach (var d in sftp.ConnectionInfo.Encryptions.Where(p => p.Key != "aes256-cbc").ToList())
sftp.ConnectionInfo.Encryptions.Remove(d.Key); // remove all Encryptions but the one listed above
sftp.ConnectionInfo.Encoding = System.Text.UTF8Encoding.ASCII;
sftp.Connect(); // always connects fine
var files = sftp.ListDirectory("/SubDirectory"); // Error here for some sub dirs






