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:
parent
b68f601fbb
commit
c8686e47dc
@ -14,7 +14,9 @@ export class PromptModalComponent {
|
||||
) { }
|
||||
|
||||
ngOnInit () {
|
||||
this.input.nativeElement.focus()
|
||||
setTimeout(() => {
|
||||
this.input.nativeElement.focus()
|
||||
})
|
||||
}
|
||||
|
||||
ok () {
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user