pull/409/head
xiaojunnuo 2025-04-22 15:53:19 +08:00
parent dc5a5fa543
commit d8d255980e
2 changed files with 10 additions and 10 deletions

View File

@ -63,15 +63,15 @@ export class SshAccess extends BaseAccess {
})
passphrase!: string;
// @AccessInput({
// title: "伪终端",
// helper: "如果登录报错all authentication methods failed可以尝试开启伪终端模式进行keyboard-interactive方式登录",
// component: {
// name: "a-switch",
// vModel: "checked",
// },
// })
// pty!: boolean;
@AccessInput({
title: "伪终端",
helper: "如果登录报错all authentication methods failed可以尝试开启伪终端模式进行keyboard-interactive方式登录\n开启后对日志输出有一定的影响",
component: {
name: "a-switch",
vModel: "checked",
},
})
pty!: boolean;
@AccessInput({
title: "socks代理",

View File

@ -172,7 +172,7 @@ export class AsyncSsh2Client {
this.logger.info(`执行命令:[${this.connConf.host}][exec]: \n` + script);
// pty 伪终端window下的输出会带上conhost.exe之类的多余的字符串影响返回结果判断
// linux下 当使用keyboard-interactive 登录时需要pty
const pty = !this.connConf.windows //linux下开启伪终端windows下不开启
const pty = this.connConf.pty; //linux下开启伪终端windows下不开启
this.conn.exec(script, { pty, env: opts.env }, (err: Error, stream: any) => {
if (err) {
reject(err);