mirror of
https://github.com/certd/certd.git
synced 2026-04-24 20:57:26 +08:00
chore:
This commit is contained in:
@@ -63,15 +63,15 @@ export class SshAccess extends BaseAccess {
|
|||||||
})
|
})
|
||||||
passphrase!: string;
|
passphrase!: string;
|
||||||
|
|
||||||
// @AccessInput({
|
@AccessInput({
|
||||||
// title: "伪终端",
|
title: "伪终端",
|
||||||
// helper: "如果登录报错:all authentication methods failed,可以尝试开启伪终端模式进行keyboard-interactive方式登录",
|
helper: "如果登录报错:all authentication methods failed,可以尝试开启伪终端模式进行keyboard-interactive方式登录\n开启后对日志输出有一定的影响",
|
||||||
// component: {
|
component: {
|
||||||
// name: "a-switch",
|
name: "a-switch",
|
||||||
// vModel: "checked",
|
vModel: "checked",
|
||||||
// },
|
},
|
||||||
// })
|
})
|
||||||
// pty!: boolean;
|
pty!: boolean;
|
||||||
|
|
||||||
@AccessInput({
|
@AccessInput({
|
||||||
title: "socks代理",
|
title: "socks代理",
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ export class AsyncSsh2Client {
|
|||||||
this.logger.info(`执行命令:[${this.connConf.host}][exec]: \n` + script);
|
this.logger.info(`执行命令:[${this.connConf.host}][exec]: \n` + script);
|
||||||
// pty 伪终端,window下的输出会带上conhost.exe之类的多余的字符串,影响返回结果判断
|
// pty 伪终端,window下的输出会带上conhost.exe之类的多余的字符串,影响返回结果判断
|
||||||
// linux下 当使用keyboard-interactive 登录时,需要pty
|
// 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) => {
|
this.conn.exec(script, { pty, env: opts.env }, (err: Error, stream: any) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
reject(err);
|
reject(err);
|
||||||
|
|||||||
Reference in New Issue
Block a user