Set Up SSH Two-Factor Authentication (2FA) on CentOS/RHEL Server
This tutorial will show you how to set up SSH two-factor authentication on CentOS/RHEL server using the well-known Google Authenticator. It will greatly improve the security of SSH service on your CentOS/RHEL server.
How Two-Factor Authentication Works
Usually you only need to enter a password or use SSH key to log in to your remote CentOS/RHEL server. Two-factor authentication (2FA) requires you to enter two pieces of information in order to login, so you will also need to enter a time-based one-time password to log in to your SSH server. This one-time password is computed using the TOTP algorithm, which is an IETF standard. These days many websites and services (Facebook, Google, Twitter, etc) offer 2FA for users to secure their accounts and it’s a good idea to also enable 2FA for your SSH server.
Read full tutorial here: https://www.linuxbabe.com/redhat/ssh-two-factor-authentication-centos-rhel