diff --git a/src/node/entry.ts b/src/node/entry.ts index ac95ad14..1a497a79 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 c2e1ec17..76a44579 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}`) }) }