This commit is contained in:
xiaojunnuo
2025-04-22 15:53:19 +08:00
parent dc5a5fa543
commit d8d255980e
2 changed files with 10 additions and 10 deletions
+1 -1
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);