支持keyboard-interactive认证

This commit is contained in:
chaos-zhu 2024-12-22 15:31:48 +08:00
parent aaf79fe60a
commit 6252f481d5

View File

@ -88,11 +88,14 @@ async function createTerminal(hostId, socket, targetSSHClient) {
consola.error('连接终端失败:', host, err.message)
socket.emit('connect_terminal_fail', err.message)
})
.on('keyboard-interactive', function (name, instructions, instructionsLang, prompts, finish) {
finish([targetConnectionOptions[authType]])
})
.connect({
tryKeyboard: true,
...targetConnectionOptions
// debug: (info) => console.log(info)
})
} catch (err) {
consola.error('创建终端失败: ', host, err.message)
socket.emit('create_terminal_fail', err.message)