<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Himadri Ganguly</title>
    <description>The latest articles on DEV Community by Himadri Ganguly (@himadriganguly).</description>
    <link>https://dev.to/himadriganguly</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F474483%2F43a6b3d6-86c8-4b9a-bdc0-8146934e853f.jpeg</url>
      <title>DEV Community: Himadri Ganguly</title>
      <link>https://dev.to/himadriganguly</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/himadriganguly"/>
    <language>en</language>
    <item>
      <title>Scraping external URL metrics using Python and exporting to Prometheus</title>
      <dc:creator>Himadri Ganguly</dc:creator>
      <pubDate>Wed, 28 Apr 2021 16:05:31 +0000</pubDate>
      <link>https://dev.to/himadriganguly/scraping-external-url-metrics-using-python-and-exporting-to-prometheus-1494</link>
      <guid>https://dev.to/himadriganguly/scraping-external-url-metrics-using-python-and-exporting-to-prometheus-1494</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0Npxhgjj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wddp7l8us6myb4wiqckp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0Npxhgjj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wddp7l8us6myb4wiqckp.png" alt="Grafana Dashboard"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The sample application in &lt;strong&gt;Python&lt;/strong&gt; producing &lt;strong&gt;Prometheus&lt;/strong&gt; format metrics at the endpoint "&lt;strong&gt;/metrics&lt;/strong&gt;", is collected by &lt;strong&gt;Prometheus&lt;/strong&gt; and a dashboard in &lt;strong&gt;Grafana&lt;/strong&gt; is used to display the metrics. You can build the &lt;strong&gt;Docker&lt;/strong&gt; image and deploy the application in &lt;strong&gt;Kubernetes&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/himadriganguly/sample_external_url"&gt;https://github.com/himadriganguly/sample_external_url&lt;/a&gt;&lt;/p&gt;

</description>
      <category>prometheus</category>
      <category>python</category>
      <category>grafana</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>Configure SSH Server With Key-Based And Two Factor Authentication</title>
      <dc:creator>Himadri Ganguly</dc:creator>
      <pubDate>Tue, 29 Dec 2020 19:03:01 +0000</pubDate>
      <link>https://dev.to/himadriganguly/configure-ssh-server-with-key-based-and-two-factor-authentication-3oc2</link>
      <guid>https://dev.to/himadriganguly/configure-ssh-server-with-key-based-and-two-factor-authentication-3oc2</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgck7y7cuivnorbya3wzn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgck7y7cuivnorbya3wzn.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SSH&lt;/strong&gt; or &lt;strong&gt;secure shell&lt;/strong&gt; is an encrypted protocol used to connect to a server. I think all of us used it for connecting to servers but have you used &lt;strong&gt;two-factor authentication&lt;/strong&gt; with &lt;strong&gt;SSH&lt;/strong&gt; to make the process more secure? Most of you might have not done this till now. So in this tutorial we will go step by step to make that magic happen on &lt;strong&gt;Ubuntu&lt;/strong&gt; and &lt;strong&gt;CentOs&lt;/strong&gt; server (&lt;strong&gt;LOL&lt;/strong&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;We all know what &lt;strong&gt;SSH&lt;/strong&gt; is, but to be on the same page let's discuss a little bit about &lt;strong&gt;Secure Shell&lt;/strong&gt; a.k.a &lt;strong&gt;SSH&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;SSH or Secure Shell is a cryptographic network protocol for operating network services securely over an unsecured network. Typical applications include remote command-line, login, and remote command execution, but any network service can be secured with SSH.&lt;/code&gt; - From &lt;a href="https://en.wikipedia.org/wiki/SSH_(Secure_Shell)" rel="noopener noreferrer"&gt;&lt;strong&gt;Wikipedia&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So from the definition, we can understand that the main focus of this protocol is securely connecting to services over the untrusted network using a client-server architecture. When data is transferred it is secured and not in plain-text that transfers through the wire, so even if someone eavesdropping on your network they will not able to get the data. It came into existence to replace the &lt;strong&gt;Telnet&lt;/strong&gt; protocol which transfers data in &lt;strong&gt;plain-text&lt;/strong&gt; over the network. The standard port for &lt;strong&gt;SSH&lt;/strong&gt; server is &lt;strong&gt;22&lt;/strong&gt; and the client connects to the server on this port.&lt;/p&gt;

&lt;p&gt;There are a lot of ways &lt;strong&gt;SSH&lt;/strong&gt; &lt;code&gt;user authentication&lt;/code&gt; can be done but in this article, we will see how to use the combination of &lt;strong&gt;SSH Key-Based And Two Factor Authentication&lt;/strong&gt;. In &lt;strong&gt;SSH Key-Based Authentication&lt;/strong&gt; two cryptographic keys are generated one &lt;strong&gt;public&lt;/strong&gt; and one &lt;strong&gt;private&lt;/strong&gt; key. The public key is transferred to the SSH server and the private key is retained by the client which is later used to prove the identity of the client. The private key should be kept securely so that it doesn't get exposed to any untrusted parties.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create SSH Keys
&lt;/h2&gt;

&lt;p&gt;The first step of configuring &lt;strong&gt;SSH Key-Based Authentication&lt;/strong&gt; is creating the &lt;strong&gt;SSH&lt;/strong&gt; keys. To do this we will go to our &lt;code&gt;Linux&lt;/code&gt; terminal and use the tool &lt;code&gt;ssh-keygen&lt;/code&gt; to generate the keys. In most &lt;code&gt;Linux&lt;/code&gt; distros this tool is present by default but if not, please &lt;strong&gt;Google&lt;/strong&gt; it to find the installation procedure.&lt;/p&gt;

&lt;p&gt;Generating SSH key pair&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nv"&gt;$ &lt;/span&gt;ssh-keygen


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This will prompt for the name of the file which will be stored in the default location at &lt;code&gt;~/.ssh&lt;/code&gt;, within the home directory of the user. The default name of the public key is &lt;strong&gt;id_rsa.pub&lt;/strong&gt; and the private key is &lt;strong&gt;id_rsa&lt;/strong&gt;.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

Generating public/private rsa key pair.
Enter file &lt;span class="k"&gt;in &lt;/span&gt;which to save the key &lt;span class="o"&gt;(&lt;/span&gt;/home/username/.ssh/id_rsa&lt;span class="o"&gt;)&lt;/span&gt;:


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Next, it will prompt for the &lt;strong&gt;passphrase&lt;/strong&gt; if you want to encrypt your &lt;strong&gt;private key&lt;/strong&gt; in your local system. This &lt;strong&gt;passphrase&lt;/strong&gt; will protect the private key even the key is exposed to any malicious user, and it will prompt for the password to decrypt it when using this private key to connect to the &lt;strong&gt;SSH&lt;/strong&gt; server. If you don't want to use a password just hit the &lt;strong&gt;ENTER&lt;/strong&gt; key which will not encrypt the &lt;strong&gt;private key&lt;/strong&gt;. For this demo, I am not using any passphrase so pressing &lt;strong&gt;ENTER&lt;/strong&gt; and &lt;strong&gt;ENTER&lt;/strong&gt; again to confirm no password.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

Enter passphrase &lt;span class="o"&gt;(&lt;/span&gt;empty &lt;span class="k"&gt;for &lt;/span&gt;no passphrase&lt;span class="o"&gt;)&lt;/span&gt;:


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;After this, it will generate the Keys&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

Generating public/private rsa key pair.
Enter file &lt;span class="k"&gt;in &lt;/span&gt;which to save the key &lt;span class="o"&gt;(&lt;/span&gt;/home/username/.ssh/id_rsa&lt;span class="o"&gt;)&lt;/span&gt;:
Enter passphrase &lt;span class="o"&gt;(&lt;/span&gt;empty &lt;span class="k"&gt;for &lt;/span&gt;no passphrase&lt;span class="o"&gt;)&lt;/span&gt;:
Enter same passphrase again:
Your identification has been saved &lt;span class="k"&gt;in&lt;/span&gt; /home/username/.ssh/id_rsa
Your public key has been saved &lt;span class="k"&gt;in&lt;/span&gt; /home/username/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:Vv6kq8aYMxH4f+0zP7zltoCDaoE14uHqhtOoVqcvOKE username@hostname
The key&lt;span class="s1"&gt;'s randomart image is:
+---[RSA 3072]----+
|                 |
|                 |
|     .    .      |
|    .o.o o       |
|    o.=.S . .    |
| . . =oo  .+.    |
|. B +  *...+.o  .|
|EB *  =.= ..= +o.|
|+ =.o..=.o...+o=o|
+----[SHA256]-----+


&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If you now list the directory &lt;code&gt;~/.ssh&lt;/code&gt; you can see that two files are created&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; ~/.ssh
id_rsa  id_rsa.pub


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Transfer Public Key To SSH Server
&lt;/h2&gt;

&lt;p&gt;Transferring the public key to the &lt;strong&gt;SSH&lt;/strong&gt; server can be done in two ways we will see both the methods. I have created two virtual servers -&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Ubuntu Server 20.04&lt;/strong&gt; - 192.168.99.105&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CentOs 8&lt;/strong&gt; - 192.168.99.104&lt;/li&gt;
&lt;/ol&gt;
&lt;h4&gt;
  
  
  Manually Copy SSH Public Key To Server
&lt;/h4&gt;

&lt;p&gt;We will copy the &lt;strong&gt;SSH&lt;/strong&gt; public key manually to the Ubuntu server.&lt;/p&gt;

&lt;p&gt;We will cat the content of the public key&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; ~/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDL9LHP61fH98RJ0hAhAdqTTd6dQPJ0H07vHrMzsa8S/bxxRgfd850+aE8mpHcuRnf1I+UMCKpkLZvhUJRBKXW9SmHu6skhXw0mY+TsLZFM3MjziX6vr+el4gbPZ6XROklGbY6BH3axmGz4uaaO/3vKYDGCdOSodm3azQ7ewPgJtOFNGV3BEsTuQh/Q2rmoO/a31FArntvQrljuuYt3Fd9jHTdjd82TjRUoqPR4MugJiB2I8iiVL4kY/VjZrkYiG47rtzOYBNohsQm1knI7Sg0KggR2s27hpvZvQl7guVLAGaF5Rif8vQPQkXIKUdOR46pIjvNAdt2y3HwNd36Uskr3jFmtd/Nf8mAweooKMdP9eNLX9GZX4h49jLJJXL6d3GmnnmUAA3LFauL5BObAKdftILWzGe3KrBroNtTED5nRAWYl8+EVLTDN7sWVE8UhqxH1gEx4gpbQ1dFmqlb9fcgg9349vlzG9bi/lhkIEFgrUUObh7SLJwAjXPEVGqgooHE&lt;span class="o"&gt;=&lt;/span&gt; username@hostname


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Copy the whole content and login to the server i.e in this case &lt;strong&gt;Ubuntu&lt;/strong&gt; server and paste the content in this file &lt;code&gt;~/.ssh/authorized_keys&lt;/code&gt;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

username@ubuntu-test-server:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;mkdir&lt;/span&gt; ~/.ssh
username@ubuntu-test-server:~&lt;span class="nv"&gt;$ &lt;/span&gt;vi ~/.ssh/authorized_keys


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now go to your &lt;strong&gt;local console&lt;/strong&gt; and check the connection to the server using &lt;strong&gt;SSH Key-Based Authentication&lt;/strong&gt;.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nv"&gt;$ &lt;/span&gt;ssh username@192.168.99.105


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If everything works as expected will be able to log into the remote &lt;strong&gt;Ubuntu&lt;/strong&gt; server console.&lt;/p&gt;

&lt;h4&gt;
  
  
  Copy SSH Public Key Using SSH Copy Id
&lt;/h4&gt;

&lt;p&gt;Another way we can copy the &lt;strong&gt;SSH&lt;/strong&gt; public key to the server is by using the tool called &lt;code&gt;ssh-copy-id&lt;/code&gt; which is by default included with the &lt;strong&gt;SSH&lt;/strong&gt; package. But for this to work you should be able to login to the server using &lt;strong&gt;SSH&lt;/strong&gt; username and password.&lt;/p&gt;

&lt;p&gt;We will use this method to copy the key to the &lt;strong&gt;CentOs&lt;/strong&gt; server.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ssh"&gt;&lt;code&gt;

&lt;span class="err"&gt;$&lt;/span&gt; &lt;span class="k"&gt;ssh&lt;/span&gt;-copy-id username@192.168.99.104


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If this is the first time you are connecting to the server computer will ask you to confirm the identity of the server.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

/usr/bin/ssh-copy-id: INFO: Source of key&lt;span class="o"&gt;(&lt;/span&gt;s&lt;span class="o"&gt;)&lt;/span&gt; to be installed: &lt;span class="s2"&gt;"/home/username/.ssh/id_rsa.pub"&lt;/span&gt;
The authenticity of host &lt;span class="s1"&gt;'192.168.99.104 (192.168.99.104)'&lt;/span&gt; can&lt;span class="s1"&gt;'t be established.
ECDSA key fingerprint is SHA256:ZLd3hAk7HENCuKG+T6yEEIKQdSZefSNICP6cmjv/O1E.
Are you sure you want to continue connecting (yes/no/[fingerprint])?


&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Type &lt;strong&gt;yes&lt;/strong&gt; and hit &lt;strong&gt;ENTER&lt;/strong&gt; to continue. Now the &lt;strong&gt;public&lt;/strong&gt; key will be copied to the server. It will ask for the &lt;strong&gt;SSH password&lt;/strong&gt; for the particular user, to do the operation.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

/usr/bin/ssh-copy-id: INFO: attempting to log &lt;span class="k"&gt;in &lt;/span&gt;with the new key&lt;span class="o"&gt;(&lt;/span&gt;s&lt;span class="o"&gt;)&lt;/span&gt;, to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key&lt;span class="o"&gt;(&lt;/span&gt;s&lt;span class="o"&gt;)&lt;/span&gt; remain to be installed &lt;span class="nt"&gt;--&lt;/span&gt; &lt;span class="k"&gt;if &lt;/span&gt;you are prompted now it is to &lt;span class="nb"&gt;install &lt;/span&gt;the new keys
username@192.168.99.104&lt;span class="s1"&gt;'s password:

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh '&lt;/span&gt;username@192.168.99.104&lt;span class="s1"&gt;'"
and check to make sure that only the key(s) you wanted were added.


&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If you go to the &lt;strong&gt;CentOs&lt;/strong&gt; server and cat the file &lt;code&gt;~/.ssh/authorized_keys&lt;/code&gt; you will get the exact content of your local &lt;code&gt;id_rsa.pub&lt;/code&gt; file.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="o"&gt;[&lt;/span&gt;username@centos-test-server ~]&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; ~/.ssh/authorized_keys


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now from your &lt;strong&gt;local console&lt;/strong&gt;, check the connection to the server using &lt;strong&gt;SSH Key-Based Authentication&lt;/strong&gt;.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nv"&gt;$ &lt;/span&gt;ssh username@192.168.99.104


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If we have done above steps correctly we will be able to get the remote shell of the &lt;strong&gt;CentOs&lt;/strong&gt; server.&lt;/p&gt;

&lt;h2&gt;
  
  
  Disable SSH Password-Based Authentication
&lt;/h2&gt;

&lt;p&gt;As we are able to &lt;strong&gt;SSH&lt;/strong&gt; both the servers using &lt;strong&gt;Key-Based Authentication&lt;/strong&gt;, so now we can disable the &lt;strong&gt;Password-Based Authentication&lt;/strong&gt; in both the &lt;strong&gt;SSH&lt;/strong&gt; server.&lt;/p&gt;

&lt;p&gt;In order to disable password-based authentication in &lt;strong&gt;SSH&lt;/strong&gt; you have to edit the file &lt;code&gt;/etc/ssh/sshd_config&lt;/code&gt; in &lt;code&gt;sudo&lt;/code&gt; mode and change the line &lt;strong&gt;PasswordAuthentication&lt;/strong&gt; from &lt;code&gt;yes&lt;/code&gt; to &lt;code&gt;no&lt;/code&gt;. The process is the same for both the server.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="o"&gt;[&lt;/span&gt;username@centos-test-server ~]&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;vi /etc/ssh/sshd_config


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Edit line&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="c"&gt;# To disable tunneled clear text passwords, change to no here!&lt;/span&gt;
PasswordAuthentication no &lt;span class="c"&gt;# Change this line from yes to no&lt;/span&gt;
&lt;span class="c"&gt;#PermitEmptyPasswords no&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Save the file and exit. Next restart &lt;strong&gt;SSH&lt;/strong&gt; daemon.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="o"&gt;[&lt;/span&gt;username@centos-test-server ~]&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl restart sshd


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Enable Two Factor Authentication In SSH
&lt;/h2&gt;

&lt;p&gt;To use this feature we will be using two tools&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Google_Authenticator" rel="noopener noreferrer"&gt;Google Authenticator PAM module&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://authy.com/" rel="noopener noreferrer"&gt;Authy&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you want to know what is &lt;strong&gt;Pluggable Authentication Module&lt;/strong&gt; a.k.a &lt;strong&gt;PAM&lt;/strong&gt; you can check it out at&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://www.redhat.com/sysadmin/pluggable-authentication-modules-pam" rel="noopener noreferrer"&gt;https://www.redhat.com/sysadmin/pluggable-authentication-modules-pam&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://www.opengroup.org/rfc/rfc86.0.html" rel="noopener noreferrer"&gt;http://www.opengroup.org/rfc/rfc86.0.html&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let's setup each server one by one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ubuntu Server&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First, we have to install the &lt;strong&gt;Google Authenticator PAM&lt;/strong&gt; module on the server.&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;libpam-google-authenticator &lt;span class="nt"&gt;-y&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Next, we have to instruct &lt;strong&gt;PAM&lt;/strong&gt; to use the &lt;strong&gt;Google Authenticator&lt;/strong&gt; module with &lt;strong&gt;SSH&lt;/strong&gt;. To do so we have to edit the &lt;strong&gt;PAM&lt;/strong&gt; file &lt;code&gt;sshd&lt;/code&gt; and add the line &lt;code&gt;auth required pam_google_authenticator.so nullok&lt;/code&gt; at the end of the file, also comment the line &lt;code&gt;@include common-auth&lt;/code&gt; in the file.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

username@ubuntu-test-server:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;vi /etc/pam.d/sshd


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Add the line&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="c"&gt;# Standard Un*x password updating.&lt;/span&gt;
@include common-password
auth required pam_google_authenticator.so nullok &lt;span class="c"&gt;# Add this line&lt;/span&gt;



&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The &lt;strong&gt;nullok&lt;/strong&gt; at the end of the line indicates that the &lt;strong&gt;OTP&lt;/strong&gt; is optional while login in using &lt;strong&gt;SSH&lt;/strong&gt; if &lt;strong&gt;OTP&lt;/strong&gt; is not set up for that user. After you tested everything you can remove the &lt;strong&gt;nullok&lt;/strong&gt; from the line to make &lt;strong&gt;2FA&lt;/strong&gt; mandatory.&lt;/p&gt;

&lt;p&gt;Edit line&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="c"&gt;# Standard Un*x authentication.&lt;/span&gt;
&lt;span class="c"&gt;#@include common-auth # Comment out this line&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Next, we have to instruct &lt;strong&gt;SSH&lt;/strong&gt; service to use this &lt;strong&gt;2FA&lt;/strong&gt;, to do so we have to edit the file &lt;code&gt;/etc/ssh/sshd_config&lt;/code&gt; and change the line &lt;strong&gt;ChallengeResponseAuthentication&lt;/strong&gt; from &lt;code&gt;no&lt;/code&gt; to &lt;code&gt;yes&lt;/code&gt;.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

username@ubuntu-test-server:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;vi /etc/ssh/sshd_config


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Edit line&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="c"&gt;# Change to yes to enable challenge-response passwords (beware issues with&lt;/span&gt;
&lt;span class="c"&gt;# some PAM modules and threads)&lt;/span&gt;
ChallengeResponseAuthentication &lt;span class="nb"&gt;yes&lt;/span&gt; &lt;span class="c"&gt;# Change the line from no to yes&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Add another line&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

AuthenticationMethods publickey,keyboard-interactive &lt;span class="c"&gt;# Add this line&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Restart &lt;strong&gt;SSH&lt;/strong&gt; service&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

username@ubuntu-test-server:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl restart sshd


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Next, we will generate the time-based token using &lt;strong&gt;Google Authenticator&lt;/strong&gt; and add it to our &lt;strong&gt;Authy App&lt;/strong&gt;.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

username@ubuntu-test-server:~&lt;span class="nv"&gt;$ &lt;/span&gt;google-authenticator


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;It will ask to confirm if you want to generate time-based authentication token. Type &lt;strong&gt;y&lt;/strong&gt; and hit &lt;strong&gt;ENTER&lt;/strong&gt;.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

Do you want authentication tokens to be time-based &lt;span class="o"&gt;(&lt;/span&gt;y/n&lt;span class="o"&gt;)&lt;/span&gt; y


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;It will generate the &lt;strong&gt;QR code&lt;/strong&gt; which you can scan in &lt;strong&gt;Authy App&lt;/strong&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;strong&gt;Authy App&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Click on the &lt;strong&gt;3-dots&lt;/strong&gt; on the top right corner&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Add Account&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Scan QR Code&lt;/strong&gt; button and scan the code&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Next, it will ask to update the &lt;strong&gt;Google Authenticator&lt;/strong&gt; file in your home directory. You must do this otherwise this &lt;strong&gt;2FA&lt;/strong&gt; will not work.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

Do you want me to update your &lt;span class="s2"&gt;"/home/username/.google_authenticator"&lt;/span&gt; file? &lt;span class="o"&gt;(&lt;/span&gt;y/n&lt;span class="o"&gt;)&lt;/span&gt; y


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;It will ask if the token is used only once in every &lt;strong&gt;30 seconds&lt;/strong&gt;. This will help to mitigate the &lt;strong&gt;man-in-the-middle&lt;/strong&gt; attack by destroying the key once used.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

Do you want to disallow multiple uses of the same authentication
token? This restricts you to one login about every 30s, but it increases
your chances to notice or even prevent man-in-the-middle attacks &lt;span class="o"&gt;(&lt;/span&gt;y/n&lt;span class="o"&gt;)&lt;/span&gt; y


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;It will ask if you want to change the time skew. By default, it will generate &lt;strong&gt;3 valid code&lt;/strong&gt; in a &lt;strong&gt;1:50 minutes&lt;/strong&gt; rolling window before it time out. Unless there is an issue we should stick to the default.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

By default, a new token is generated every 30 seconds by the mobile app.
In order to compensate &lt;span class="k"&gt;for &lt;/span&gt;possible time-skew between the client and the server,
we allow an extra token before and after the current time. This allows &lt;span class="k"&gt;for &lt;/span&gt;a
&lt;span class="nb"&gt;time &lt;/span&gt;skew of up to 30 seconds between authentication server and client. If you
experience problems with poor &lt;span class="nb"&gt;time &lt;/span&gt;synchronization, you can increase the window
from its default size of 3 permitted codes &lt;span class="o"&gt;(&lt;/span&gt;one previous code, the current
code, the next code&lt;span class="o"&gt;)&lt;/span&gt; to 17 permitted codes &lt;span class="o"&gt;(&lt;/span&gt;the 8 previous codes, the current
code, and the 8 next codes&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="nb"&gt;.&lt;/span&gt; This will permit &lt;span class="k"&gt;for &lt;/span&gt;a &lt;span class="nb"&gt;time &lt;/span&gt;skew of up to 4 minutes
between client and server.
Do you want to &lt;span class="k"&gt;do &lt;/span&gt;so? &lt;span class="o"&gt;(&lt;/span&gt;y/n&lt;span class="o"&gt;)&lt;/span&gt; n


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now there is another beautiful feature of rate-limiting, which will block a remote user after &lt;strong&gt;3 unsuccessful&lt;/strong&gt; failed attempts.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

If the computer that you are logging into isn&lt;span class="s1"&gt;'t hardened against brute-force
login attempts, you can enable rate-limiting for the authentication module.
By default, this limits attackers to no more than 3 login attempts every 30s.
Do you want to enable rate-limiting? (y/n) y


&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;We are done with the setup of our &lt;strong&gt;Ubuntu&lt;/strong&gt; server with both &lt;strong&gt;Key-Based&lt;/strong&gt; and &lt;strong&gt;2FA Authentication&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Let's test if it is working or not. So exit from the &lt;strong&gt;Ubuntu&lt;/strong&gt; server and run the ssh command from &lt;strong&gt;local terminal&lt;/strong&gt;.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="nv"&gt;$ &lt;/span&gt;ssh username@192.168.99.105


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now it will prompt for verification code.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

Verification code:


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;After providing the &lt;strong&gt;2FA&lt;/strong&gt; authentication code from the &lt;strong&gt;Authy App&lt;/strong&gt; we logged into the &lt;strong&gt;Ubuntu&lt;/strong&gt; server shell.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CentOs Server&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To install &lt;strong&gt;Google Authenticator PAM&lt;/strong&gt; in &lt;strong&gt;CentOs&lt;/strong&gt; server we have to install the &lt;strong&gt;epel&lt;/strong&gt; repository first.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="o"&gt;[&lt;/span&gt;username@centos-test-server ~]&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;yum &lt;span class="nb"&gt;install &lt;/span&gt;epel-release &lt;span class="nt"&gt;-y&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now install &lt;strong&gt;Google Authenticator PAM&lt;/strong&gt; and &lt;strong&gt;qrencode&lt;/strong&gt; (which is used to display the QR code).&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="o"&gt;[&lt;/span&gt;username@centos-test-server ~]&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;yum &lt;span class="nb"&gt;install &lt;/span&gt;google-authenticator &lt;span class="nt"&gt;-y&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;yum &lt;span class="nb"&gt;install &lt;/span&gt;qrencode &lt;span class="nt"&gt;-y&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Next, we have to instruct PAM to use &lt;strong&gt;Google Authenticator&lt;/strong&gt; module before login into SSH.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="o"&gt;[&lt;/span&gt;username@centos-test-server ~]&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;vi /etc/pam.d/sshd


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Add the line to the end of the file&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

session    include      postlogin
auth required pam_google_authenticator.so nullok &lt;span class="nv"&gt;secret&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/home/&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;USER&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;/.ssh/.google_authenticator


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The line is the same as we have done previously only difference is the part &lt;code&gt;secret=/home/${USER}/.ssh/.google_authenticator&lt;/code&gt; which specified the location of the &lt;code&gt;.google_authenticator&lt;/code&gt; config file which have to be moved from &lt;code&gt;~/.google_authenticator&lt;/code&gt; to &lt;code&gt;~/.ssh/.google_authenticator&lt;/code&gt; location due to &lt;strong&gt;SELinux&lt;/strong&gt; security context, otherwise, it will not work.&lt;/p&gt;

&lt;p&gt;Comment out the line&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="c"&gt;#auth       substack     password-auth # Comment this line&lt;/span&gt;
auth       include      postlogin


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Before moving forward we have to move the file &lt;code&gt;.google_authenticator&lt;/code&gt; to the &lt;code&gt;~/.ssh/&lt;/code&gt; folder&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="o"&gt;[&lt;/span&gt;username@centos-test-server ~]&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;mv&lt;/span&gt; ~/.google_authenticator ~/.ssh/


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Next, we have to instruct &lt;strong&gt;SSH&lt;/strong&gt; service to use this &lt;strong&gt;2FA&lt;/strong&gt;, to do so we have to edit the file &lt;code&gt;/etc/ssh/sshd_config&lt;/code&gt; and change the line &lt;strong&gt;ChallengeResponseAuthentication&lt;/strong&gt; from &lt;code&gt;no&lt;/code&gt; to &lt;code&gt;yes&lt;/code&gt;.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="o"&gt;[&lt;/span&gt;username@centos-test-server ~]&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;vi /etc/ssh/sshd_config


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Edit line&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="c"&gt;# Change to yes to enable challenge-response passwords (beware issues with&lt;/span&gt;
&lt;span class="c"&gt;# some PAM modules and threads)&lt;/span&gt;
ChallengeResponseAuthentication &lt;span class="nb"&gt;yes&lt;/span&gt; &lt;span class="c"&gt;# Change this line from no to yes&lt;/span&gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Add another line&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

AuthenticationMethods publickey,keyboard-interactive


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Restart &lt;strong&gt;SSH&lt;/strong&gt; service&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;

&lt;span class="o"&gt;[&lt;/span&gt;username@centos-test-server ~]&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl restart sshd


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Generating a time-based token using the &lt;strong&gt;Google Authenticator&lt;/strong&gt; and adding it to &lt;strong&gt;Authy App&lt;/strong&gt; is the same as above.&lt;/p&gt;

&lt;p&gt;After completing all the steps if everything works fine we can log in to the &lt;strong&gt;CentOs&lt;/strong&gt; server using &lt;strong&gt;Key-Based&lt;/strong&gt; and &lt;strong&gt;Two Factor Authentication&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Hope you like this article. In this article, I tried to explain as much as possible and in a simple step by step method, how we can create &lt;strong&gt;SSH&lt;/strong&gt; key based authentication and implement &lt;strong&gt;2FA&lt;/strong&gt; authentication using &lt;strong&gt;Google Authenticator&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Thank you.&lt;/p&gt;

</description>
      <category>ssh</category>
      <category>2fa</category>
      <category>ubuntu</category>
      <category>centos</category>
    </item>
    <item>
      <title>CKA &amp; CKAD Completed</title>
      <dc:creator>Himadri Ganguly</dc:creator>
      <pubDate>Mon, 21 Dec 2020 12:19:19 +0000</pubDate>
      <link>https://dev.to/himadriganguly/cka-ckad-completed-la0</link>
      <guid>https://dev.to/himadriganguly/cka-ckad-completed-la0</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qrRw5vfJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/q2kmuwffzptwtvcheman.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qrRw5vfJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/q2kmuwffzptwtvcheman.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Very happy to end this year 2020 with a positive, meaningful, and knowledgeful ending while completing the two eminent certifications in the DevOps field - &lt;strong&gt;Certified Kubernetes Administrator&lt;/strong&gt; (&lt;strong&gt;CKA&lt;/strong&gt;) and &lt;strong&gt;Certified Kubernetes Application Developer&lt;/strong&gt; (&lt;strong&gt;CKAD&lt;/strong&gt;) from &lt;strong&gt;Cloud Native Computing Foundation&lt;/strong&gt; in association with &lt;strong&gt;The Linux Foundation&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Always hope for the best and keep trying to achieve whatever we want in difficult times as well. Even if we fail there will be some learning which can be rectified in the next journey.&lt;/p&gt;

&lt;p&gt;Another thing like to share with those who are going for the exam of &lt;strong&gt;K8s&lt;/strong&gt;, just don't sit for the exam only to get a good position in a career or for a change in a better job role, this will definitely not help you if you don't love this technology, clear out the concept and try hands-on with &lt;strong&gt;K8s&lt;/strong&gt; even if that topic is not included in the exam. The main point is that if you don't love the technology you can't work with it in long run and after some time get bored which will affect your career as well.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;KubeAcademy&lt;/strong&gt; is also a very good platform developed by VMware to learn &lt;strong&gt;Kubernetes&lt;/strong&gt;. All the courses are free and taught by experienced persons. You check it out at - &lt;a href="https://kube.academy/"&gt;https://kube.academy/&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I like to wish those who are preparing for the exam or learning &lt;strong&gt;K8s&lt;/strong&gt; all the best.&lt;/p&gt;

&lt;p&gt;BIG THUMPS UP AND LOTS OF LOVE TO Google FOR SHARING SUCH A WONDERFUL TECHNOLOGY WITH THE OPENSOURCE COMMUNITY AND EASILY ACCESSIBLE TO EVERYONE. 👍❤️❤️👍&lt;/p&gt;

&lt;p&gt;Keep &lt;strong&gt;learning&lt;/strong&gt; and keep &lt;strong&gt;sharing&lt;/strong&gt; knowledge. Power of &lt;strong&gt;OPEN SOURCE&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qrRw5vfJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/q2kmuwffzptwtvcheman.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qrRw5vfJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/q2kmuwffzptwtvcheman.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>kubernetes</category>
      <category>orchestration</category>
      <category>devops</category>
    </item>
    <item>
      <title>Got My CKAD Certificate</title>
      <dc:creator>Himadri Ganguly</dc:creator>
      <pubDate>Sun, 06 Dec 2020 07:37:21 +0000</pubDate>
      <link>https://dev.to/himadriganguly/got-my-ckad-certificate-51i5</link>
      <guid>https://dev.to/himadriganguly/got-my-ckad-certificate-51i5</guid>
      <description>&lt;p&gt;Very excited to complete &lt;strong&gt;Part 1&lt;/strong&gt; of the &lt;strong&gt;Kubernetes&lt;/strong&gt; certification journey.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--j4lDwadJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cndl4omaffd8796v5dg5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--j4lDwadJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cndl4omaffd8796v5dg5.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Today received my certificate from The &lt;strong&gt;Linux Foundation&lt;/strong&gt; for the completion of my &lt;strong&gt;Certified Kubernetes Application Developer&lt;/strong&gt; (&lt;strong&gt;CKAD&lt;/strong&gt;) certification. &lt;/p&gt;

&lt;p&gt;I like to thank my parents for their love and support without them nothing is possible and to all those who love and support me.&lt;/p&gt;

&lt;p&gt;This made my DAY.&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>orchestration</category>
      <category>opensource</category>
      <category>k8s</category>
    </item>
    <item>
      <title>YaraSilly2 Open Source Threat Intelligent Project For Contribution In HacktoberFest</title>
      <dc:creator>Himadri Ganguly</dc:creator>
      <pubDate>Wed, 30 Sep 2020 12:08:49 +0000</pubDate>
      <link>https://dev.to/himadriganguly/yarasilly2-open-source-threat-intelligent-project-for-contribution-in-hacktoberfest-22d8</link>
      <guid>https://dev.to/himadriganguly/yarasilly2-open-source-threat-intelligent-project-for-contribution-in-hacktoberfest-22d8</guid>
      <description>&lt;h1&gt;
  
  
  What is Yara Silly2?
&lt;/h1&gt;

&lt;p&gt;A semi-automatic handy tool to generate &lt;strong&gt;YARA&lt;/strong&gt; rules from sample virus files ( WIP ) for Malware Analyst, inspired by the &lt;strong&gt;DIFF&lt;/strong&gt; function of &lt;strong&gt;VirusTotal Premium Account&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You can find some sample virus files at &lt;a href="https://github.com/YARA-Silly-Silly/sample-malwares"&gt;https://github.com/YARA-Silly-Silly/sample-malwares&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can find the project repo at &lt;a href="https://github.com/YARA-Silly-Silly/sample-malwares"&gt;https://github.com/YARA-Silly-Silly/yarasilly2&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Why you should contribute?
&lt;/h1&gt;

&lt;p&gt;The following are the rewards and benefits for contributors to this project.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;If you are an active contributor we will add your image and Github handle in our &lt;a href="https://github.com/YARA-Silly-Silly/yarasilly2/blob/master/README.md"&gt;&lt;strong&gt;Readme&lt;/strong&gt;&lt;/a&gt; file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This project will give a good understanding of the malware analysis world from the &lt;strong&gt;Blue Team&lt;/strong&gt; perspective.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You can get to learn how &lt;a href="https://yara.readthedocs.io/en/stable/"&gt;&lt;strong&gt;YARA rules&lt;/strong&gt;&lt;/a&gt; work and details regarding the rules.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lear to use &lt;strong&gt;Python&lt;/strong&gt; in the world of &lt;strong&gt;Threat Identification&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  How you can contribute?
&lt;/h1&gt;

&lt;p&gt;You don't have to be a coder to contribute to this project you can contribute by providing suggestions to improve the application or any other better way you want to involve in the project. &lt;/p&gt;

&lt;p&gt;Want to provide suggestions? You can post it here - &lt;a href="https://github.com/YARA-Silly-Silly/yarasilly2/issues/3"&gt;https://github.com/YARA-Silly-Silly/yarasilly2/issues/3&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Are you a developer and want to try your hands dirty by adding new features to the application or make the existing code better? Check out the link - &lt;a href="https://github.com/YARA-Silly-Silly/yarasilly2/blob/master/CONTRIBUTING.md"&gt;https://github.com/YARA-Silly-Silly/yarasilly2/blob/master/CONTRIBUTING.md&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  About Us
&lt;/h2&gt;

&lt;p&gt;Yara Silly Silly is maintained by:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Himadri Ganguly&lt;/th&gt;
&lt;th&gt;GitHub&lt;/th&gt;
&lt;th&gt;Twitter&lt;/th&gt;
&lt;th&gt;LinkedIn&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.linkedin.com/in/hganguly/"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4v9I5rXb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://avatars0.githubusercontent.com/u/5839433%3Fs%3D88%26u%3D6ed858dba3762eb0d929b48649b787ac9db112b7%26v%3D4" width="100px;" alt="himadriganguly"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;em&gt;&lt;a href="https://github.com/himadriganguly" title="Github"&gt;&lt;img alt="Himadri's GitHub" width="22px" src="https://res.cloudinary.com/practicaldev/image/fetch/s--97Df3Re5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.jsdelivr.net/npm/simple-icons%40v3/icons/github.svg"&gt;&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;&lt;em&gt;&lt;a href="https://twitter.com/himadritech" title="Twitter"&gt;&lt;img alt="Himadri Ganguly - Twitter" width="22px" src="https://res.cloudinary.com/practicaldev/image/fetch/s--Wgrai2sU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.jsdelivr.net/npm/simple-icons%40v3/icons/twitter.svg"&gt;&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;&lt;em&gt;&lt;a href="https://www.linkedin.com/in/hganguly/" title="LinkedIn"&gt;&lt;img alt="Himadri Ganguly - LinkedIn" width="22px" src="https://res.cloudinary.com/practicaldev/image/fetch/s--Plf-akE9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.jsdelivr.net/npm/simple-icons%40v3/icons/linkedin.svg"&gt;&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Krishnendu Paul&lt;/th&gt;
&lt;th&gt;GitHub&lt;/th&gt;
&lt;th&gt;Twitter&lt;/th&gt;
&lt;th&gt;LinkedIn&lt;/th&gt;
&lt;th&gt;Website&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;a href="https://www.linkedin.com/in/krishpaul/"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nPgKol4w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://avatars2.githubusercontent.com/u/3284091%3Fs%3D400%26u%3D9c3983a826301000f0d6b8191fdda6042b065157%26v%3D4" width="100px;" alt="bidhata"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;em&gt;&lt;a href="https://github.com/bidhata" title="Github"&gt;&lt;img alt="Krishnendu's GitHub" width="22px" src="https://res.cloudinary.com/practicaldev/image/fetch/s--97Df3Re5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.jsdelivr.net/npm/simple-icons%40v3/icons/github.svg"&gt;&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;&lt;em&gt;&lt;a href="https://twitter.com/bidhata" title="Twitter"&gt;&lt;img alt="Krishnendu Paul - Twitter" width="22px" src="https://res.cloudinary.com/practicaldev/image/fetch/s--Wgrai2sU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.jsdelivr.net/npm/simple-icons%40v3/icons/twitter.svg"&gt;&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;&lt;em&gt;&lt;a href="https://www.linkedin.com/in/krishpaul/" title="LinkedIn"&gt;&lt;img alt="Krishnendu Paul - LinkedIn" width="22px" src="https://res.cloudinary.com/practicaldev/image/fetch/s--Plf-akE9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.jsdelivr.net/npm/simple-icons%40v3/icons/linkedin.svg"&gt;&lt;/a&gt;&lt;/em&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="https://krishnendu.com/" title="Website"&gt;&lt;img alt="Krishnendu Paul - Website" width="22px" src="https://res.cloudinary.com/practicaldev/image/fetch/s--YZiGPiMq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.jsdelivr.net/npm/simple-icons%40v3/icons/googlechrome.svg"&gt;&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
      <category>hacktoberfest</category>
      <category>python</category>
      <category>opensource</category>
      <category>github</category>
    </item>
    <item>
      <title>YaraSilly2 - YARA Rule Generator</title>
      <dc:creator>Himadri Ganguly</dc:creator>
      <pubDate>Sat, 26 Sep 2020 23:51:10 +0000</pubDate>
      <link>https://dev.to/himadriganguly/yarasilly2-6ba</link>
      <guid>https://dev.to/himadriganguly/yarasilly2-6ba</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fm11axhrqe7kc9bxdmmgf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fm11axhrqe7kc9bxdmmgf.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A Semi-automatic handy tool to generate YARA rules from sample virus files ( WIP ) for Malware Analyst, inspired by the DIFF function of VirusTotal Premium Account. It generates all the artifacts from samples ( Static Analyzer ) needed to create good Yara Rules, with less false positive. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features&lt;/strong&gt;:-&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;It uses a fuzzy match to find similar malware files based on tolerance the percentage set by the user. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;String dump from the files in binary mode and find the occurrences of the files and take those string that occurs the specified number of times set by the user.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Eliminate all the blacklist strings that are provided from the match occurrences criteria.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Generate YARA rule and also prints the MD5 hash of the files within the meta section of YARA rules.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can find the project repo at &lt;a href="https://github.com/YARA-Silly-Silly/yarasilly2" rel="noopener noreferrer"&gt;https://github.com/YARA-Silly-Silly/yarasilly2&lt;/a&gt;&lt;/p&gt;

</description>
      <category>malware</category>
      <category>python</category>
      <category>yara</category>
      <category>ssdeeep</category>
    </item>
  </channel>
</rss>
