This is a simple setup guide to enabling Two Factor Authentication (2FA) on Linux SSH login. I this article I wont go deep into setup and issues that I have faced when implementing this. First thing is first Update your system first. I have used Ubuntu 20.04 and it is always up to date. To enable 2FA you need to install google authenticator modules sudo apt install libpam-google-authenticator Configuration for PAM and SSHD Add the the following line to /etc/pam.d/sshd and After adding this line please restart the sshd services. auth required pam_google_authenticator.so Go to /etc/ssh/sshd_config and check if the following line exist. Default value will be "no" so change it to "yes" to activate. ChallengeResponseAuthentication yes Configuration for Authenticator In the terminal run google authenticator command It will ask few things to acknowledge by user. Details you can see from the below video. Once this part is done you are ready to use the 2FA in ubuntu. T
After bricking one router i decided not to try to increase the storage and go with the capabilities which it already have.
TL-MR3020 from TP-LINK have a UART but the problem with interconnection was TL-MR3020 out puts 3.3v and Arduino UNO is 5v. So after trying couple for methods trying to level the serial data voltage, finally 74LS04 is used the step up the TX from router to 5v and it was success and Arduino see the data.
Then tried to run a shell script from a webpage run in web server inside the router.
After couple of frustrations i manage to run with html+javascript...thats a long story...
Anyways it works perfectly and more mods will be done soon.
Comments
You can follow the openwrt website to get the firmware for TP-LINK TL-MR3020 and after the firmware is uploaded, basically you will get a small linux box out of a small router :)
The you can control the serial or test it from an echo command.
I already have done lots of modifications for level converting. cause the router serial voltage is 3.3V so need to level convert for both RX and TX.
If you have any concerns let me know