diff --git a/app/package.json b/app/package.json index 8590433c30..97f5e85a17 100644 --- a/app/package.json +++ b/app/package.json @@ -30,7 +30,7 @@ "native-process-working-directory": "^1.0.2", "npm": "6", "rxjs": "^7.5.7", - "russh": "0.1.15", + "russh": "0.1.16", "source-map-support": "^0.5.20", "v8-compile-cache": "^2.3.0", "yargs": "^17.7.2" diff --git a/app/yarn.lock b/app/yarn.lock index e3bfb2998c..1fb5664026 100644 --- a/app/yarn.lock +++ b/app/yarn.lock @@ -3628,10 +3628,10 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" -russh@0.1.15: - version "0.1.15" - resolved "https://registry.yarnpkg.com/russh/-/russh-0.1.15.tgz#121c0be876c6b70c43910a56fadefffe78588a35" - integrity sha512-md/72roZn8nmgq+U8rVrfqHS82aPancQM5VqrYh7wEMcnK/ll8vNJJcKH/YJv5/8n8Ovxrl8SMwDE5DlfXSL6Q== +russh@0.1.16: + version "0.1.16" + resolved "https://registry.yarnpkg.com/russh/-/russh-0.1.16.tgz#f2192855e71ed4e17cb515d88c4739f05acdea86" + integrity sha512-L6X3liMiTReSv9dOZd3GYObTLlV7YULW0oBxh0lD0HCVDmsnTMRKJFyaA2hd+9vjlPHc7ICHPf5NcReJz+pnCA== dependencies: "@napi-rs/cli" "^2.18.3" diff --git a/tabby-ssh/src/session/ssh.ts b/tabby-ssh/src/session/ssh.ts index 98072593e7..e86235d5a8 100644 --- a/tabby-ssh/src/session/ssh.ts +++ b/tabby-ssh/src/session/ssh.ts @@ -576,15 +576,12 @@ export class SSHSession { if (method.type === 'publickey') { try { const key = await this.loadPrivateKey(method.name, method.contents) - const possibleHashAlgs = ['ssh-rsa', 'rsa-sha2-256', 'rsa-sha2-512'].includes(key.algorithm) ? ['sha256', 'sha512', 'sha1'] as const : [null] as const this.emitServiceMessage(`Trying private key: ${method.name}`) - for (const alg of possibleHashAlgs) { - const result = await this.ssh.authenticateWithKeyPair(this.authUsername, key, alg) - if (result instanceof russh.AuthenticatedSSHClient) { - return result - } - maybeSetRemainingMethods(result) + const result = await this.ssh.authenticateWithKeyPair(this.authUsername, key, null) + if (result instanceof russh.AuthenticatedSSHClient) { + return result } + maybeSetRemainingMethods(result) } catch (e) { this.emitServiceMessage(colors.bgYellow.yellow.black(' ! ') + ` Failed to load private key ${method.name}: ${e}`) continue