Posts

Showing posts from June, 2021

How to enable SSH 2FA on AlmaLinux

Image
 In this tutorial, How to enable two-factor authentication (2FA) for SSH logins.  Install the Google Authenticator on AlmaLinux sudo dnf install epel-release -y sudo dnf install google-authenticator qrencode qrencode-libs -y After install completes, I will create a new secret key in ~/.ssh directory Run command as follows google-authenticator -s ~/.ssh/google_authenticator The output terminal as below [root@DevopsRoles ~]# google-authenticator -s ~/.ssh/google_authenticator Do you want authentication tokens to be time-based (y/n) y Warning: pasting the following URL into your browser exposes the OTP secret to Google:   https://www.google.com/chart?chs=200x200&chld=M|0&cht=qr&chl=otpauth://totp/[email protected]%3Fsecret%3DDXFSMCJ42VQ7FPMS2VAJ3CIJIE%26issuer%3DDevopsRoles.com Your new secret key is: DXFSMCJ42VQ7FPMS2VAJ3CIJIE Your verification code is 222214 Your emergency scratch codes are:   36072722   12212187   31577834   31344084   92578576 Do you want me to update y