Browse Source

authentication none introduced

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

5
src/server/command.ts

@ -69,12 +69,17 @@ function sshOptions(
'-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