mirror of
https://github.com/Eugeny/tabby.git
synced 2025-06-15 17:09:59 +00:00
ssh: respect keyboard-interactive prompt echo setting - fixes #5045
This commit is contained in:
parent
f308fd481d
commit
bb47a5d76f
@ -2,7 +2,7 @@
|
|||||||
strong Keyboard-interactive auth
|
strong Keyboard-interactive auth
|
||||||
.ml-2 {{prompt.name}}
|
.ml-2 {{prompt.name}}
|
||||||
|
|
||||||
.prompt-text {{prompt.prompts[step]}}
|
.prompt-text {{prompt.prompts[step].prompt}}
|
||||||
|
|
||||||
input.form-control.mt-2(
|
input.form-control.mt-2(
|
||||||
#input,
|
#input,
|
||||||
|
@ -15,7 +15,7 @@ export class KeyboardInteractiveAuthComponent {
|
|||||||
@ViewChild('input') input: ElementRef
|
@ViewChild('input') input: ElementRef
|
||||||
|
|
||||||
isPassword (): boolean {
|
isPassword (): boolean {
|
||||||
return this.prompt.prompts[this.step].toLowerCase().includes('password')
|
return this.prompt.prompts[this.step].prompt.toLowerCase().includes('password') || !this.prompt.prompts[this.step].echo
|
||||||
}
|
}
|
||||||
|
|
||||||
previous (): void {
|
previous (): void {
|
||||||
|
@ -11,6 +11,7 @@ import { ConfigService, FileProvidersService, HostAppService, NotificationsServi
|
|||||||
import { BaseSession } from 'tabby-terminal'
|
import { BaseSession } from 'tabby-terminal'
|
||||||
import { Socket } from 'net'
|
import { Socket } from 'net'
|
||||||
import { Client, ClientChannel, SFTPWrapper } from 'ssh2'
|
import { Client, ClientChannel, SFTPWrapper } from 'ssh2'
|
||||||
|
import type { Prompt } from 'ssh2-streams'
|
||||||
import { Subject, Observable } from 'rxjs'
|
import { Subject, Observable } from 'rxjs'
|
||||||
import { ProxyCommandStream, SocksProxyStream } from '../services/ssh.service'
|
import { ProxyCommandStream, SocksProxyStream } from '../services/ssh.service'
|
||||||
import { PasswordStorageService } from '../services/passwordStorage.service'
|
import { PasswordStorageService } from '../services/passwordStorage.service'
|
||||||
@ -34,7 +35,7 @@ export class KeyboardInteractivePrompt {
|
|||||||
constructor (
|
constructor (
|
||||||
public name: string,
|
public name: string,
|
||||||
public instruction: string,
|
public instruction: string,
|
||||||
public prompts: string[],
|
public prompts: Prompt[],
|
||||||
private callback: (_: string[]) => void,
|
private callback: (_: string[]) => void,
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
@ -213,7 +214,7 @@ export class SSHSession extends BaseSession {
|
|||||||
this.emitKeyboardInteractivePrompt(new KeyboardInteractivePrompt(
|
this.emitKeyboardInteractivePrompt(new KeyboardInteractivePrompt(
|
||||||
name,
|
name,
|
||||||
instructions,
|
instructions,
|
||||||
prompts.map(x => x.prompt),
|
prompts,
|
||||||
finish,
|
finish,
|
||||||
))
|
))
|
||||||
}))
|
}))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user