OTP challenge SSH/ThinLinc on Ubuntu 22.04

Short tutorial how to enable 2FA/OTP (ex. Google Authenticator) when logging in via SSH or in my case mainly ThinLinc Terminal Sessions. If you haven’t set up NTP or some other time sync now is the “time”, since OTP is dependent on correct clocks. 1. Install google-authenticator sudo apt install libpam-google-authenticator 2. Configure sshd Edit file /etc/ssh/sshd_config ... # Change to yes to enable challenge-response passwords (beware issues with # some PAM modules and threads) KbdInteractiveAuthentication yes ... 3. Configure PAM Edit the file /etc/pam.d/common-auth and add these two lines at the bottom. ...

2024-09-20 · 3 min · Tobias Tillstam