I'm using ssh2-sftp-client 10.0.3 with node v18.16.1 I am connecting to two different sftp servers that each contain the same file. One is identified as "SSH-2.0-AWS_SFTP_1.1", the other as "SSH-2.0-MOVEit Transfer SFTP". When connecting to the first server, I successfully get the file with the fastGet command. When connecting to the second server, I get
Error: fastGet->sftp: The handle value was invalid. Remote: sample.csv Local: sample.csv at SftpClient.fmtError (C:\sftpTest\node_modules\ssh2-sftp-client\src\index.js:87:22) at SftpClient.fastGet (C:\sftpTest\node_modules\ssh2-sftp-client\src\index.js:613:18) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async C:\sftpTest\sftpKeys\testSftp2.js:13:9 { code: 'ERR_GENERIC_CLIENT', custom: true }
Is there something I should include in the connect statement, e.g., the "algorithms" parameter? Does anyone know of any issues with MOVEit that require a special set up? This is how I currently have it set up:
sftp.connect({
host: hostName,
port: '22',
username: userName,
privateKey: ppk,
debug: fnDebug
})
The debug output is long, so I won't initially post it, but if there's anything I should be looking for, please let me know. Thanks.
Resolved. MOVEit didn't support fastGet. When I switched to get, everything worked.