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...
Its been a while that i have noticed an error that sometime frustrates. When i first start using Arduino Uno and flash custom ATMEGA328P firmware i have faced tons of problems and each of them ease my work when i found a cause and solution for that.
Most of Arduino users faced this and thousands of posts were in the forums related to avrdude: stk500_getsync(): not in sync: resp=0x00 error. Some solutions in the forums are not much solved the issues. Earlier i faced this when i built a custom PCB with ATMEGA328P-AU.
After flashing the firmware via ICSP (In circuit Serial Programming) Then i used FTDI serial to load the sketch. Finally the error occurs and the whole project came to a halt.
I have spent most of the time troubleshooting and found solutions for it.
I will state what i have found, which cause this error normally.
FTDI/Serial module normally have VCC,GND,RX,TX,DTR,CTS totally six pins or five (without CTS). Most common mistake is when connecting FTDI module to ATMEGA328 or any for loading sketch, they usually connect VCC,GND,RX and TX or sometimes VCC,GND,RX,TX,DTR (DTR pin is connected directly to ATMEG's reset pin). Most cases connecting RX to RX or TX to TX or missing GND pin.
All the above combinations cause the issue and to avoid this its better use the following combination.
FTDI Arduino
RX TX
TX RX
VCC VCC
GND GND
DTR To reset pin with a series ceramic capacitor of (0.1uf / 104)
I have fixed most of sync issues by maintaining this configuration, :)
If you follow these guides and still unable to load the sketch successfully, try this one last step.
Most of Arduino users faced this and thousands of posts were in the forums related to avrdude: stk500_getsync(): not in sync: resp=0x00 error. Some solutions in the forums are not much solved the issues. Earlier i faced this when i built a custom PCB with ATMEGA328P-AU.
ATMEGA328P-AU |
Screen shot of Arduino IDE |
I will state what i have found, which cause this error normally.
- Wrong device selected from the IDE
- PCB/Circuit designing issues.
- FTDI module / Driver & software issues.
Wrong device selected from the IDE
Arduino IDE > Tools menu |
Most cases by mistake you might have selected a wrong device for FTDI programming. If you have loaded firmware for Uno you have to select Arduino Uno as shown in the image. So avoid this silly mistake while you are flashing and programming. Don't be too confident, because even experienced programmers have done silly mistakes like this. :)
PCB/Circuit designing issues.
If you want to load the sketch via FTDI, there is some thing that you need to keep on mind. I have seen in forums the schematic has a very common mistake.FTDI/Serial module normally have VCC,GND,RX,TX,DTR,CTS totally six pins or five (without CTS). Most common mistake is when connecting FTDI module to ATMEGA328 or any for loading sketch, they usually connect VCC,GND,RX and TX or sometimes VCC,GND,RX,TX,DTR (DTR pin is connected directly to ATMEG's reset pin). Most cases connecting RX to RX or TX to TX or missing GND pin.
All the above combinations cause the issue and to avoid this its better use the following combination.
FTDI Arduino
RX TX
TX RX
VCC VCC
GND GND
DTR To reset pin with a series ceramic capacitor of (0.1uf / 104)
I have fixed most of sync issues by maintaining this configuration, :)
FTDI module / Driver & software issues
I have seen some of Arduino users complaining about the FTDI module issues. Some say the FTDI chip from china are fake and it don't support driver updates of FTDI either in windows/Linux.
I would like to say that i always import my electronics components from china and i never faced such issues in FTDI modules or chips they sell. Its been more than two years that i am using this module and never faced any driver or software issues in windows or Linux.
FTDI module (FT232RL) |
Go to the COM settings if you are using windows and decrease RX and TX buffer values and do tick the check box above.
Conclusion.
All these test are done recently after creating a faulty setup to give a better solution for the sync error. I hope this help you all and if i mentioned anything wrong. Please do not hesitate to comment. All positive and negative comments are welcome.
Comments