Two Factor Google auth with private key authentication

Hi,
I am attempting to setup google auth/ two factor with public key authentication. So the use case we require is.
Login from the thinlic clicent with the private key, Type the pass phrase, prompt for two factor, session begin.

However we seems that thinlinc client returns “You are not authorised to connect to this server”

If you connect from a text ssh session it logs in as you would expect with pass phrase and two factor code. I have looked through other threads that have mentioned there is a problem with using both private key and password auth however we are just using private key and two factor.

Is this a supported combination There seems to be some conflicting info regarding this.

System is ubuntu with sshd_config

UsePAM yes
PubkeyAuthentication yes
PasswordAuthentication no
ChallengeResponseAuthentication yes
AuthenticationMethods publicket,keyboard-interactive:pam

Pam Config
auth sufficient pam_google_authenticator.so

thinlinc client is MacOS

No, chaining different authentication methods together is not yet supported in ThinLinc.

This is being tracked as #4692 in our Bugzilla. Please feel free to add yourself to the CC List to get notified of any movement in that bug.

Kind regards,
Martin

1 Like