From 2ee5fd58de6a6407cd1e80b730bdfc3204aaac16 Mon Sep 17 00:00:00 2001 From: Sergei Ratnikov Date: Tue, 14 Jul 2020 18:25:05 +0300 Subject: [PATCH] Fix ssh user name can not set in url parameter /ssh/:user. Every time asking login name. --- src/server/command/index.ts | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/server/command/index.ts b/src/server/command/index.ts index cc3e97d..41f7b71 100644 --- a/src/server/command/index.ts +++ b/src/server/command/index.ts @@ -31,14 +31,15 @@ export default ( args: !forcessh && localhost(host) ? loginOptions(command, remoteAddress) : sshOptions( - urlArgs(referer, { - host: address(referer, user, host), - port: `${port}`, - pass: pass || '', - command, - auth, - knownhosts, - }), + { ...urlArgs(referer, { + port: `${port}`, + pass: pass || '', + command, + auth, + knownhosts, + }), + host: address(referer, user, host) + }, key ), user: