Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
4aea99dd
Commit
4aea99dd
authored
Oct 31, 2019
by
SparkSnail
Committed by
QuanluZhang
Oct 31, 2019
Browse files
Support keyboard-interactive mode in ssh client (#1650)
parent
483232c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
src/nni_manager/training_service/remote_machine/remoteMachineData.ts
...ager/training_service/remote_machine/remoteMachineData.ts
+4
-1
No files found.
src/nni_manager/training_service/remote_machine/remoteMachineData.ts
View file @
4aea99dd
...
@@ -209,7 +209,8 @@ export class SSHClientManager {
...
@@ -209,7 +209,8 @@ export class SSHClientManager {
const
connectConfig
:
ConnectConfig
=
{
const
connectConfig
:
ConnectConfig
=
{
host
:
this
.
rmMeta
.
ip
,
host
:
this
.
rmMeta
.
ip
,
port
:
this
.
rmMeta
.
port
,
port
:
this
.
rmMeta
.
port
,
username
:
this
.
rmMeta
.
username
};
username
:
this
.
rmMeta
.
username
,
tryKeyboard
:
true
};
if
(
this
.
rmMeta
.
passwd
!==
undefined
)
{
if
(
this
.
rmMeta
.
passwd
!==
undefined
)
{
connectConfig
.
password
=
this
.
rmMeta
.
passwd
;
connectConfig
.
password
=
this
.
rmMeta
.
passwd
;
}
else
if
(
this
.
rmMeta
.
sshKeyPath
!==
undefined
)
{
}
else
if
(
this
.
rmMeta
.
sshKeyPath
!==
undefined
)
{
...
@@ -231,6 +232,8 @@ export class SSHClientManager {
...
@@ -231,6 +232,8 @@ export class SSHClientManager {
.
on
(
'
error
'
,
(
err
:
Error
)
=>
{
.
on
(
'
error
'
,
(
err
:
Error
)
=>
{
// SSH connection error, reject with error message
// SSH connection error, reject with error message
deferred
.
reject
(
new
Error
(
err
.
message
));
deferred
.
reject
(
new
Error
(
err
.
message
));
}).
on
(
"
keyboard-interactive
"
,
(
name
,
instructions
,
lang
,
prompts
,
finish
)
=>
{
finish
([
this
.
rmMeta
.
passwd
]);
})
})
.
connect
(
connectConfig
);
.
connect
(
connectConfig
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment