mirror of
https://github.com/certd/certd.git
synced 2026-04-14 20:40:53 +08:00
chore:
This commit is contained in:
@@ -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代理",
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user