diff --git a/src/connect.ts b/src/connect.ts index 907053f..28f96f1 100644 --- a/src/connect.ts +++ b/src/connect.ts @@ -235,7 +235,7 @@ export async function createSSH(config: FileSystemConfig, sock?: NodeJS.Readable }); try { const finalConfig: ConnectConfig = { ...config, sock, ...DEFAULT_CONFIG }; - if (config.debug) { + if (config.debug || getFlag('DEBUG_SSH2') !== undefined) { const scope = Logging.scope(`ssh2(${config.name})`); finalConfig.debug = (msg: string) => scope.debug(msg); }