Hi!
I found your ssh2-utils module and I think it's really good.
I'm wondering if there any way to use operations without opening and closing new connection for each operation?
Please, review my code part below:
//create autotest directory on server
ssh.mkdir(server, remoteTestDir, function (err, server, conn) {
if (err) console.log(err);
conn.end();
console.log
});
//create LOGS directory on server
ssh.mkdir(server, remoteTestDir + 'logs/', function (err, server, conn) {
if (err) console.log(err);
conn.end();
});
//put 2pdmf file to server
ssh.putFile(server, localUtilsDir + runDMFFileName, remoteTestDir + runDMFFileName, function (err, server, conn) {
if (err) console.log(err);
conn.end();
console.log('put 2pdmf file to server');
});
I have to apply conn.end(); after each operation and I think that this is not the best solution.
Could you clarify if there is any other way to manage the code?
Hi!
I found your ssh2-utils module and I think it's really good.
I'm wondering if there any way to use operations without opening and closing new connection for each operation?
Please, review my code part below:
I have to apply conn.end(); after each operation and I think that this is not the best solution.
Could you clarify if there is any other way to manage the code?