diff --git a/terminus-ssh/src/services/ssh.service.ts b/terminus-ssh/src/services/ssh.service.ts index bd7581ff..74e6e548 100644 --- a/terminus-ssh/src/services/ssh.service.ts +++ b/terminus-ssh/src/services/ssh.service.ts @@ -200,9 +200,6 @@ export class SSHService { } const authMethodsLeft = ['none'] - if (!session.connection.auth || session.connection.auth === 'password') { - authMethodsLeft.push('password') - } if (!session.connection.auth || session.connection.auth === 'publicKey') { if (!privateKey) { log('\r\nPrivate key auth selected, but no key is loaded\r\n') @@ -217,6 +214,9 @@ export class SSHService { authMethodsLeft.push('agent') } } + if (!session.connection.auth || session.connection.auth === 'password') { + authMethodsLeft.push('password') + } if (!session.connection.auth || session.connection.auth === 'keyboardInteractive') { authMethodsLeft.push('keyboard-interactive') }