option to skip the ssh banner (fixes #2121)

This commit is contained in:
Eugene Pankov 2020-02-16 23:04:26 +01:00
parent dc03a7f135
commit 298209b03a
3 changed files with 12 additions and 2 deletions

View File

@ -33,6 +33,7 @@ export interface SSHConnection {
readyTimeout?: number readyTimeout?: number
color?: string color?: string
x11?: boolean x11?: boolean
skipBanner?: boolean
algorithms?: {[t: string]: string[]} algorithms?: {[t: string]: string[]}
} }

View File

@ -85,6 +85,11 @@
placeholder='#000000' placeholder='#000000'
) )
.form-line
.header
.title Skip MoTD/banner
toggle([(ngModel)]='connection.skipBanner')
.form-line .form-line
.header .header
.title Keep Alive Interval (Milliseconds) .title Keep Alive Interval (Milliseconds)

View File

@ -148,11 +148,15 @@ export class SSHService {
})) }))
ssh.on('greeting', greeting => { ssh.on('greeting', greeting => {
if (!session.connection.skipBanner) {
log('Greeting: ' + greeting) log('Greeting: ' + greeting)
}
}) })
ssh.on('banner', banner => { ssh.on('banner', banner => {
log('Banner: \n' + banner) if (!session.connection.skipBanner) {
log(banner)
}
}) })
let agent: string|null = null let agent: string|null = null