perf: ssh 配置sudo免密提示

This commit is contained in:
xiaojunnuo
2025-08-19 17:06:14 +08:00
parent eb75e52278
commit e1e7011853
5 changed files with 15 additions and 12 deletions

View File

@@ -247,6 +247,9 @@ export class AsyncSsh2Client {
const err = this.convert(iconv, ret);
stdErr += err;
hasErrorLog = true;
if (err.includes("sudo: a password is required")) {
this.logger.warn("请配置sudo免密否则命令无法执行");
}
this.logger.error(`[${this.connConf.host}][error]: ` + err.trimEnd());
});
});