I've being trying to set up my first ever (minimal?) Ubuntu 20 VPS and I have reached a learning point where I can secure and tune control for other users. I have being trying so far to setup 2FA from google with the QR code. But I don't want to create public keys for every computer that I will have to connect to the vps and just scan the QR code to login. libpam-google-authenticator (OTP for android with the green app doesn't find security key, but other do). The thing is I want to type firstly the password and then scan the QR so I can laterally have 2 factors of authentication.
I have being following tutorials and copy pasting commands like
PasswordAuthentication no, ChallengeResponseAuthentication yes UsePAM yes and AuthenticationMethods publickey,password publickey,keyboard-interactive (sometimes there are no errors on sshd)
I have being playing around with theese setting but most of the time it other locks me out and I have to reinstall the machine via the provided controll panel or someother times it denies my login with the correct generated code.
Can you give me an idea for I wish to make: First ask for the password and then the one time use password. I have read almost hundreds of blogs-post but I can't understand how to do this... I even tried AuthenticationMethods password,keyboard-interactive To ask first for the password and then the one time password but nothing. I've reset my machine 10000 times because I'm getting logged out every time! Also, to my understanding I can't shit on a strangers computer and generate public keys in order to access my VPS every time
I can clearly see and understand most of things in /etc/ssh/sshd_config but that thing AuthenticationMethods I can't get it to successfully ask for password first and then the OneTimePassword
Before I reinstall my system again I'm following this tutorial: https://notthebe.ee/Creating-your-own-OpenVPN-server.html
Ye's I'm a beginner and I start from simpler things, but I'm not seeking for a solution (just follow the tutorial and be done) I'm looking for more, for a path to learn more
Best regards,
-Clearly a windows 10 HOME user