Results 1 to 7 of 7

Thread: OpenSSH multifactor authentication

  1. #1
    Join Date
    Jan 2009
    Beans
    5

    OpenSSH multifactor authentication

    Hi,

    I have OpenSSH 6.2 installed and I'm trying to get public key + google auth both required for ssh login. I heard that 6.2 supports AuthenticationMethods which makes this possible, but whenever I add AuthenticationMethods to my sshd_config file, sshd refuses to run

    This is the line I've been adding to /etc/ssh/sshd_config:

    AuthenticationMethods publickey,keyboard-interactive

    The sshd will close shortly after starting once I add this. Any idea why? any help on this would be greatly appreciated.
    Last edited by Blazr; June 17th, 2013 at 10:11 AM.

  2. #2
    Join Date
    Dec 2012
    Beans
    66

    Re: OpenSSH multifactor authentication

    What error do you see in the logs?

  3. #3
    Join Date
    Dec 2008
    Location
    USA
    Beans
    528
    Distro
    Ubuntu 18.10 Cosmic Cuttlefish

    Re: OpenSSH multifactor authentication

    I don' really like coffee. I guess I'll give my Ubuntu beans to my wife.

    Luke

  4. #4
    Join Date
    Feb 2009
    Beans
    98
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: OpenSSH multifactor authentication

    Niiiiice!!! I didnt know about this until now.

    Gotta love this forum!
    Overclocked HPML150 running Precise Pangolin 12.04 LTS

  5. #5
    Join Date
    Jan 2009
    Beans
    5

    Re: OpenSSH multifactor authentication

    Thanks for the links guys, but I think I didn't explain myself properly.

    I have Google Authenticator working on SSH, the problem is it only works when you login via password, when you use a public key it overrides Google authenticator. I have read that OpenSSH 6.2 has a new option in the config, AuthenticationMethods, to fix this (I will post a link later), but I am unable to get it to work.

    I will also post the logs later but last time I didn't see anything interesting in there that could help.
    Last edited by Blazr; June 21st, 2013 at 11:31 PM.

  6. #6
    Join Date
    Sep 2006
    Beans
    8,627
    Distro
    Ubuntu 14.04 Trusty Tahr

    pam or sshd_config

    How are you doing the configuration, in /etc/pam.d/ somewhere or in /etc/ssh/sshd_confg?

  7. #7
    Join Date
    Oct 2013
    Beans
    1

    Re: OpenSSH multifactor authentication

    I have written a blog post about setting three-factor authentication up here: http://herehttp://turquoiseliquorice...-and-password/

    It seems that your PAM module is not correctly configured.

    Try change:

    AuthenticationMethods publickey,keyboard-interactive

    to:

    AuthenticationMethods publickey,password

    and see if that works as expected. That will confirm the issue is with PAM.

    Which guide have you followed to set up Google Authenticator?

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •