From 53560854a2b855b12215211b94b9a6ada813b6ca Mon Sep 17 00:00:00 2001 From: cfs4819 Date: Tue, 26 Mar 2024 10:56:06 +0800 Subject: [PATCH] Fix SSH X11 Repeated Handshake Issue --- tabby-ssh/src/session/ssh.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tabby-ssh/src/session/ssh.ts b/tabby-ssh/src/session/ssh.ts index 742dece7..e9d54abd 100644 --- a/tabby-ssh/src/session/ssh.ts +++ b/tabby-ssh/src/session/ssh.ts @@ -205,15 +205,15 @@ export class SSHSession { } const hostVerifiedPromise: Promise = new Promise((resolve, reject) => { - let hostkey_old = '' + let hostkeyOld = '' let isKeyVerified = false ssh.on('handshake', async handshake => { if (isKeyVerified) { resolve() return } - if (hostkey_old !== handshake.serverHostKey) { - hostkey_old = handshake.serverHostKey + if (hostkeyOld !== handshake.serverHostKey) { + hostkeyOld = handshake.serverHostKey if (!await this.verifyHostKey(handshake)) { this.ssh.end() reject(new Error('Host key verification failed'))