1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-09-22 10:28:41 +03:00

ppk passphrase support (fixes #281)

This commit is contained in:
Eugene Pankov 2018-10-27 15:46:37 +02:00
parent b68f601fbb
commit c8686e47dc
2 changed files with 8 additions and 2 deletions

View File

@ -14,7 +14,9 @@ export class PromptModalComponent {
) { }
ngOnInit () {
this.input.nativeElement.focus()
setTimeout(() => {
this.input.nativeElement.focus()
})
}
ok () {

View File

@ -49,7 +49,11 @@ export class SSHService {
if (privateKey) {
this.logger.info('Loaded private key from', privateKeyPath)
if (privateKey.includes('ENCRYPTED')) {
let encrypted = privateKey.includes('ENCRYPTED')
if (privateKeyPath.toLowerCase().endsWith('.ppk')) {
encrypted = encrypted || privateKey.includes('Encryption:') && !privateKey.includes('Encryption: none')
}
if (encrypted) {
let modal = this.ngbModal.open(PromptModalComponent)
modal.componentInstance.prompt = 'Private key passphrase'
modal.componentInstance.password = true