I'm trying to use the SftpClient to connect to a server, get a list of files, and download them. I'm easily able to download files if I already know their names, but when my code calls ListDirectory, I get a "Bad Packet Length 55836" exception.
Here is the code:
ConnectionInfo connectionInfo =
new PasswordConnectionInfo(ftpServer, 8022, FtpLogin, FtpPw);
using (var client = new SftpClient(connectionInfo))
var files = client.ListDirectory(".");
foreach (var ftpfile in files)
All very straightforward. What am I doing wrong? When I connect to the server using CoreFTP, I see the following:
SSH-2.0-1.36 sshlib: GlobalScape
client -> blowfish
server -> blowfish
xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx [substituted x's for hex digits]
Current directory is '/'
Keep alive off...
Transferred 343 bytes in 0.008 seconds