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
In previous post you have seen the data format which Pi receives from GPS. Its in bytes and here is some raw data.
Note: In order to get GPS position data i have placed the unit out of my lab where it can see clear sky.
The above data can not be handled as a string to split or etc. We need to decode it without line terminations and stuffs so i have done few test with python and finally managed to get some beautiful output for the field that i am interested.
This is the data output after decoding the data
Hope this would help you to tweak more and hack everyday. Please do subscribe my YouTube channel for more updates.
Note: In order to get GPS position data i have placed the unit out of my lab where it can see clear sky.
b'$GPGGA,092543.00,,,,,0,00,99.99,,,,,,*6F\r\n'
b'$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30\r\n'
b'$GPGSV,3,1,11,02,14,038,,05,37,025,22,12,69,190,,13,32,112,*74\r\n'
b'$GPGSV,3,2,11,15,41,162,,19,09,112,,20,17,227,,21,10,283,*77\r\n'
b'$GPGSV,3,3,11,24,21,189,,25,52,299,,29,19,339,18*4D\r\n'
b'$GPGLL,,,,,092543.00,V,N*43\r\n'
b'$GPRMC,092544.00,V,,,,,,,260718,,,N*79\r\n'
b'$GPVTG,,,,,,,,,N*30\r\n'
b'$GPGGA,092544.00,,,,,0,00,99.99,,,,,,*68\r\n'
b'$GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99*30\r\n'
b'$GPGSV,3,1,11,02,14,038,,05,37,025,22,12,69,190,,13,32,112,*74\r\n'
b'$GPGSV,3,2,11,15,41,162,,19,09,112,,20,17,227,,21,10,283,*77\r\n'
b'$GPGSV,3,3,11,24,21,189,,25,52,299,,29,19,339,18*4D\r\n'
b'$GPGLL,,,,,092544.00,V,N*44\r\n'
b'$GPRMC,092545.00,V,,,,,,,260718,,,N*78\r\n'
b'$GPVTG,,,,,,,,,N*30\r\n'
The above data can not be handled as a string to split or etc. We need to decode it without line terminations and stuffs so i have done few test with python and finally managed to get some beautiful output for the field that i am interested.
This is the data output after decoding the data
$GPGGA,092850.00,0412.75613,N,07332.47747,E,1,07,1.19,8.1,M,-93.5,M,,*7C
UTC: 092850.00
SAT: 07
FIX: 1
LAT: 0412.75613
LON: 07332.47747
Hope this would help you to tweak more and hack everyday. Please do subscribe my YouTube channel for more updates.
Comments