# Tutorial: SSH 2fa using Google Authenticator

DevFeed: [Tutorial: SSH 2fa using Google Authenticator](<https://devfeed.tech/articles/tutorial-ssh-2fa-using-google-authenticator-29860.md>)

Original publisher: [Read original article](<https://goteleport.com/blog/ssh-2fa-tutorial/>)

Author: info@goteleport.com (Troy Desjardins)

Published: 2022-01-07T00:00:00Z

Content type: tutorial

Language: en

Sources: [Teleport](<https://devfeed.tech/sources/teleport.md>)

Topics: [ssh](<https://devfeed.tech/topics/ssh.md>), [MFA](<https://devfeed.tech/topics/mfa.md>), [Authentication](<https://devfeed.tech/topics/authentication.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [QR Code](<https://devfeed.tech/topics/qrcode.md>), [Android](<https://devfeed.tech/topics/android.md>), [iOS](<https://devfeed.tech/topics/ios.md>), [Ubuntu](<https://devfeed.tech/topics/ubuntu.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [authentication](<https://devfeed.tech/tags/authentication.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [linux](<https://devfeed.tech/tags/linux.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [qr-code](<https://devfeed.tech/tags/qr-code.md>), [ssh](<https://devfeed.tech/tags/ssh.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>), [ubuntu](<https://devfeed.tech/tags/ubuntu.md>)

## AI overview

This tutorial explains how to configure SSH two-factor authentication on a Linux server using Google Authenticator PAM and time-based one-time passwords. It covers prerequisites, PAM and SSH daemon configuration, service restart, and QR-code setup for the mobile authenticator app.

## Source excerpt

This blog will walk you step-by-step through how to set up TOTP SSH 2fa (two-factor authentication) using Google Authenticator.