1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-25 19:42:42 +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