SSH optimalization

This commit is contained in:
Jan Prochazka
2024-11-15 12:09:24 +01:00
parent 5bcd3f807d
commit 4cf987b89a
2 changed files with 7 additions and 2 deletions

View File

@@ -14,7 +14,6 @@
* limitations under the License.
*/
const { Client } = require('ssh2');
const net = require('net');
const fs = require('fs');
const os = require('os');
@@ -147,6 +146,7 @@ class SSHConnection {
}
async connect(host, stream) {
const { Client } = require('ssh2');
this.debug('Connecting to "%s"', host);
const connection = new Client();
return new Promise(async (resolve, reject) => {