diff --git a/src/node/entry.ts b/src/node/entry.ts index ac95ad14b17103e7f9be4487270f2306ee202961..1a497a79d0925a235377e06092ab2ac37aac8d48 100644 --- a/src/node/entry.ts +++ b/src/node/entry.ts @@ -73,7 +73,11 @@ const main = async (args: Args): Promise => { let sshPort = "" if (!args["disable-ssh"] && options.sshHostKey) { const sshProvider = httpServer.registerHttpProvider("/ssh", SshProvider, options.sshHostKey as string) - sshPort = await sshProvider.listen() + try { + sshPort = await sshProvider.listen() + } catch (error) { + logger.warn(`SSH server: ${error.message}`) + } } const serverAddress = await httpServer.listen() diff --git a/src/node/ssh/server.ts b/src/node/ssh/server.ts index c2e1ec17d7132b02fc3c39e4a35db533d6918622..76a44579597d1d029f7ba22c85f1ae31f0117fc0 100644 --- a/src/node/ssh/server.ts +++ b/src/node/ssh/server.ts @@ -20,7 +20,7 @@ export class SshProvider extends HttpProvider { this.sshServer = new ssh.Server({ hostKeys: [hostKey] }, this.handleSsh) this.sshServer.on("error", (err) => { - logger.error(`SSH server error: ${err.stack}`) + logger.trace(`SSH server error: ${err.stack}`) }) }