Skip to main content

Posts

Showing posts from November, 2013

How to setup 2FA On Linux SSH Login

  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

GPS Data logging

 After few months of break finally managed to do some electronics stuff. Before i have tested GPS and SD card so now its combined. GPS data logging to an SD card in CSV format. The main part was to get NMEA data from GPS and convert it to one that i can use. $GPRMC,023042,A,3907.3837,N,12102.4684,W,0.0,156.1,131102,15.3,E,A*36 $GPRMB,A,,,,,,,,,,,,A,A*0B $GPGGA,023042,3907.3837,N,12102.4684,W,1,04,2.3,507.3,M,-24.1,M,,*75 $GPGSA,A,3,04,05,,,09,,,24,,,,,2.8,2.3,1.0*36 $GPGSV,3,2,11,09,47,229,42,10,04,157,00,14,00,305,00,24,70,154,33*79 $GPGLL,3907.3837,N,12102.4684,W,023042,A,A*5E $GPBOD,,T,,M,,*47 $GPVTG,156.1,T,140.9,M,0.0,N,0.0,K*41 $PGRME,8.4,M,23.8,M,25.7,M*2B $PGRMZ,1735,f*34 $PGRMM,WGS 84*06 $HCHDG,,,,15.3,E*30 $GPRTE,1,1,c,*37 $GPRMC,023044,A,3907.3840,N,12102.4692,W,0.0,156.1,131102,15.3,E,A*37 The above is NMEA data that comes our from UART of the GPS. Later capturing the following line to get latitude, longitude, fix, speed etc $GPGGA,023042,3907.3837,N,12102.4684,W,1,04