enable passphrase for ssh-privatekey

This commit is contained in:
Jay 2020-09-06 22:22:25 +08:00
parent d593174649
commit dc524327ba
2 changed files with 5 additions and 0 deletions

View File

@ -52,6 +52,10 @@
<FileInput :file.sync='connection.sshOptions.privatekey' placeholder='SSH Private Key'></FileInput>
</el-tooltip>
</el-form-item>
<el-form-item label="Passphrase">
<el-input v-model="connection.sshOptions.passphrase" type='password' autocomplete="off"></el-input>
</el-form-item>
</el-form>
<!-- SSL connection form -->

View File

@ -40,6 +40,7 @@ export default {
localPort: null,
privateKey: sshOptions.privatekey ?
fs.readFileSync(sshOptions.privatekey) : '',
passphrase: sshOptions.passphrase
};
const sshConfigRaw = JSON.parse(JSON.stringify(sshConfig));