Skip to main content

Posts

Showing posts from 2021

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

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

How Apple AirTag got hacked.

 

OpenFaaS

Dockerfile and Docker-compose

How to use Dockerfile? This file contains user commands which will be needed to build an image. This is the simplest way that I can explain this. For more information please follow the Dockerfile reference guide The following image shows a sample Dockerfile that I created to build an image with php. I will explain line by line. FROM php:7.4.4-apache - This is where you define what image you will be using to build a custom image COPY site1/ /var/www/html - This is will copy the local path content to remote path (to container) EXPOSE 80 - This is where you define which port should be exposed After creating a Dockerfile now you can build the image.  docker build -t somename #this command is to build an image with the given tag name After creating the image you can run docker images to view if the created image exists. If you want to check if the image is created or not just run this command. docker images, this will show all the images created. As you have seen the image name shows phptu

Docker? what is it?

What is docker? Docker is a set of platform as a service products that uses OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels Difference between docker and virtual Machines How to setup and run your first docker image? First install the docker for your preferred operating system. I have done my setup on ubuntu and that's my preference. Here is official docker website link for supported platforms and how to proceed installation. https://docs.docker.com/engine/install/ In docker you can run any microservices that you like and you can build your own images to run in the docker. Docker hub is a such a place which have thousands of images of microservices that can be run in seconds. By running docker you can run containers for each service you need to run.  For example, if you want to run my