"library/src/host_tensor/device.cpp" did not exist on "2c48039d0e87ace2f527c447e8148e6585a4bec3"
Commit 4aea99dd authored by SparkSnail's avatar SparkSnail Committed by QuanluZhang
Browse files

Support keyboard-interactive mode in ssh client (#1650)

parent 483232c8
......@@ -209,7 +209,8 @@ export class SSHClientManager {
const connectConfig: ConnectConfig = {
host: this.rmMeta.ip,
port: this.rmMeta.port,
username: this.rmMeta.username };
username: this.rmMeta.username,
tryKeyboard: true };
if (this.rmMeta.passwd !== undefined) {
connectConfig.password = this.rmMeta.passwd;
} else if (this.rmMeta.sshKeyPath !== undefined) {
......@@ -231,6 +232,8 @@ export class SSHClientManager {
.on('error', (err: Error) => {
// SSH connection error, reject with error message
deferred.reject(new Error(err.message));
}).on("keyboard-interactive", (name, instructions, lang, prompts, finish) => {
finish([this.rmMeta.passwd]);
})
.connect(connectConfig);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment