sanketbajoria / ssh2-promise

ssh with promise/async await and typescript support
https://www.npmjs.com/package/ssh2-promise
MIT License
148 stars 25 forks source link

command result maximum size is 512 MB #84

Open nadimgeagea95 opened 1 year ago

nadimgeagea95 commented 1 year ago

I'm using cat - grep combination because i don't want to use sftp to download the whole file as it is too large. The issue is that that there is a limit on how much a command can return. I'm writing the result of the command in a file and the size of the file is always 512 MB even though i'm sure that the command returns more than 512 MB. Is there a way to increase the limit ?

This is my code:

import SSH2Promise = require('ssh2-promise');
const ssh = new SSH2Promise({ uniqueId: id,  ...sshConfig });
const commandResult = await ssh.exec(command);