Browse Source

authentication none introduced

pull/207/head
SouraDutta 6 years ago
parent
commit
3c531f6411
  1. 7
      src/server/command.ts

7
src/server/command.ts

@ -68,13 +68,18 @@ function sshOptions(
port,
'-o',
`PreferredAuthentications=${auth}`,
];
];
console.log(`Authentication Type: ${auth}`)
if (key) {
return sshRemoteOptsBase.concat(['-i', key, cmd]);
}
if (pass) {
return ['sshpass', '-p', pass].concat(sshRemoteOptsBase, [cmd]);
}
if (auth === 'none') {
sshRemoteOptsBase.splice(sshRemoteOptsBase.indexOf('-o'), 2);
return sshRemoteOptsBase.concat([cmd]);
}
if (cmd === '') {
return sshRemoteOptsBase;
}

Loading…
Cancel
Save