Skip to content

2FA support with Google Authenticator (keyboard-interactive doesn't work) #128

@bylli79

Description

@bylli79

Hi,
First of all, thank you for this great project!

I'm trying to connect to an SSH server that has two-factor authentication (2FA) enabled, using Google Authenticator. The server is configured to require password + OTP (TOTP), which works correctly with OpenSSH or other standard clients using keyboard-interactive authentication.

I’ve tested dartssh2 with the onUserInfoRequest handler, but it seems that the library does not proceed correctly after the password prompt, and I never get the expected prompt to enter the OTP code.
So far, I couldn't get the connection to work when 2FA is enabled on the server.

Is there a recommended way to handle this kind of flow with dartssh2? Or could it be a limitation in the current implementation of keyboard-interactive?

Any help or suggestions would be greatly appreciated.
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions