Two-Factor SSH login to CentOS 7

General support questions
Locked
bertalanimre
Posts: 140
Joined: 2015/06/02 13:04:03

Two-Factor SSH login to CentOS 7

Post by bertalanimre » 2017/05/22 09:07:47

Hey Forum,

I've a CentOS 7 server where I want to enable a two-factor SSH login while using ssh-keys. I've done the following so far according any of the tutorials on the web if you search for "centos 7 google-authenticator ssh"

- Installed google_authenticator
- generated qr code with google_authenticator command
- added auth required pam_google_authenticator.so to /etc/pam.d/sshd
- changed ChallengeResponseAuthentication from no to yes in /etc/ssh/sshd_config
- restarted sshd with systemctl restart sshd

Results: I can still login without any 2nd step in the verification. So it doesn't ask for my authentication code. Do you know what did I miss according to what I've said?

Bert

bertalanimre
Posts: 140
Joined: 2015/06/02 13:04:03

Re: Two-Factor SSH login to CentOS 7

Post by bertalanimre » 2017/05/22 09:20:58

Moving this question to appropriate forum: viewtopic.php?f=51&t=62647

scottro
Forum Moderator
Posts: 2556
Joined: 2007/09/03 21:18:09
Location: NYC
Contact:

Re: Two-Factor SSH login to CentOS 7

Post by scottro » 2017/05/22 12:15:01

I'll lock this one then, so that it doesn't get answered. It's always best to ask a mod to just move the post rather than make a double post.
New users should check the FAQ and Read Me First pages

Locked