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, port,
'-o', '-o',
`PreferredAuthentications=${auth}`, `PreferredAuthentications=${auth}`,
]; ];
console.log(`Authentication Type: ${auth}`)
if (key) { if (key) {
return sshRemoteOptsBase.concat(['-i', key, cmd]); return sshRemoteOptsBase.concat(['-i', key, cmd]);
} }
if (pass) { if (pass) {
return ['sshpass', '-p', pass].concat(sshRemoteOptsBase, [cmd]); return ['sshpass', '-p', pass].concat(sshRemoteOptsBase, [cmd]);
} }
if (auth === 'none') {
sshRemoteOptsBase.splice(sshRemoteOptsBase.indexOf('-o'), 2);
return sshRemoteOptsBase.concat([cmd]);
}
if (cmd === '') { if (cmd === '') {
return sshRemoteOptsBase; return sshRemoteOptsBase;
} }

Loading…
Cancel
Save