<?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: Emmanuel Iderima</title>
    <description>The latest articles on DEV Community by Emmanuel Iderima (@theserverguy).</description>
    <link>https://dev.to/theserverguy</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1274057%2F5a1f2656-6613-49cd-9db3-0f6d134c5e9f.jpg</url>
      <title>DEV Community: Emmanuel Iderima</title>
      <link>https://dev.to/theserverguy</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/theserverguy"/>
    <language>en</language>
    <item>
      <title>Azure: SSH to a VM on Azure</title>
      <dc:creator>Emmanuel Iderima</dc:creator>
      <pubDate>Thu, 17 Sep 2026 02:49:24 +0000</pubDate>
      <link>https://dev.to/theserverguy/azure-ssh-to-a-vm-on-azure-2j6e</link>
      <guid>https://dev.to/theserverguy/azure-ssh-to-a-vm-on-azure-2j6e</guid>
      <description>&lt;p&gt;SSH allows for remote encrypted connection between a two computers (typically a client and server) using cryptography to authenticate and encrypt connection between the devices. In this guide, we would explore how to connect to a virtual machine created on microsoft azure using SSH.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Brief Overview of SSH
&lt;/h2&gt;

&lt;p&gt;Secure SHell (SSH) is a protocol on the application layer of the OSI model. It is used for remote encrypted connection between two devices. It uses asymmetric key cryptography techniques to safely create a shared key for both devices without needing to send the key across the network. It then uses the shared (symmetric) key for further encryption over the channel. SSH runs on TCP port 22 by default.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a VM on Azure
&lt;/h2&gt;

&lt;p&gt;Login to your azure portal and click on the "Create a Resource" option on the dashboard (you can also find that option on the navigation bar).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9nj6ioysatfrgenq11ro.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9nj6ioysatfrgenq11ro.png" alt="Azure dashboard" width="800" height="369"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now in the create resource page, select &lt;em&gt;Virtual machine&lt;/em&gt; , you will be navigated to the Create Virtual Machine page. Enter the required information to create your vm. A few things to pay attention to in regards to this article, for the_ Authentication Type_ in the &lt;em&gt;Administrator Account&lt;/em&gt; section, select SSH public key as the means to authenticate. Enter your vm username, generate a new key pair (except your need requires you to use an existing keypair), for the key type I recommend Ed25519 because it is faster and then enter your keypair name. Another important thing is the inbound port rule, make sure port 22 is open.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgis2yf42lne93cbz72he.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgis2yf42lne93cbz72he.png" alt="Azure portal: create resource page" width="800" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb28eqj0awhveqf29jnyq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fb28eqj0awhveqf29jnyq.png" alt="Azure portal: Create vm page" width="799" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you're done with all your network, storage and other configurations, you can go ahead and create the vm.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connecting to the virtual machine
&lt;/h2&gt;

&lt;p&gt;When you created the vm, a key.pem file was downloaded into your computer, this will be used for authentication. First of all, move this file to the ~/.ssh folder (create one if it's not already there). Now change the the permissions of the key.pem file to give readonly access.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chmod 400 ~/.ssh/key.pem
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now all we need is the public IP address of our virtual machine, we can get it on our azure portal. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgvhhee7wpy3w2w0lmrrv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgvhhee7wpy3w2w0lmrrv.png" alt="Azure portal" width="799" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To connect to our cloud vm, we run this command on our teminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh -i ~/.ssh/key.pem testvm@102.113.114.200
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In general, the syntax is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh -i &amp;lt;path_to_key_file&amp;gt; &amp;lt;vm_name&amp;gt;@&amp;lt;vm_ip_addr&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now since this is the first time connecting to the vm, we will get a message like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The authenticity of host '102.133.144.206 (102.133.144.206)' can't be established.
ED25519 key fingerprint is SHA256:bbZQo2Ph2ZV77Koob9iQT7i0G+oDNZVo9Q3fMg89T64.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? y
Please type 'yes', 'no' or the fingerprint: yes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What this means is we should verify the host (the vm) fingerprint before connecting. Now even though we just created the vm, we should still verify the returned fingerprint to make sure this response is actually from the vm. We need to make sure the figerprint on the server matches the one returned to us. We can do this by running this command on the vm through our azure portal.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ssh-keygen -lf /etc/ssh/ssh_host_ecdsa_key.pub | awk '{print $2}'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To run a command on your vm through the azure portal, go to the vm dashboard, in the sidebar, navigate to &lt;em&gt;operations&lt;/em&gt;, and click &lt;em&gt;run command&lt;/em&gt;. In the current page, click &lt;em&gt;run shell script&lt;/em&gt; and enter the command above.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5lpha65yvs936dw3vr0e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5lpha65yvs936dw3vr0e.png" alt="Azure portal: Run command page" width="800" height="368"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the server fingerprint has been verified, proceed with the connection and now you are connected to your remote vm through ssh.&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>learning</category>
      <category>networking</category>
      <category>azure</category>
    </item>
    <item>
      <title>How DNS Works</title>
      <dc:creator>Emmanuel Iderima</dc:creator>
      <pubDate>Mon, 03 Aug 2026 07:08:04 +0000</pubDate>
      <link>https://dev.to/theserverguy/how-dns-works-25j6</link>
      <guid>https://dev.to/theserverguy/how-dns-works-25j6</guid>
      <description>&lt;p&gt;Every device on the internet is identified by it's unique IP address. An IP address is a group of four 8 bit numbers (IPv4) separated by dots (eg 192.168.1.1) or group of eight 16 bit numbers (IPv6) separated by a column (eg 2001:0db8:85a3:0000:0000:8a2e:0370:7334 ) that uniquely identifies a device on a network.&lt;/p&gt;

&lt;p&gt;When you visit a website on the internet, you enter the site's domain name (eg example.com) on the browser, then an http request is made to the server hosting the site which then returns the requested data.&lt;/p&gt;

&lt;p&gt;But since every device on the internet is identified by it's IP address and not a domain name, how does the browser know to locate the server with the requested site or data? It does this using the Domain Name System (DNS).&lt;/p&gt;

&lt;p&gt;The Domain Name System simply put is a system used to translate human readable domain names to IP addresses that are used by computers and devices on the internet. In this article, we'll discuss:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How DNS works&lt;/li&gt;
&lt;li&gt;Types of DNS servers and their functions&lt;/li&gt;
&lt;li&gt;DNS records&lt;/li&gt;
&lt;li&gt;And DNS caching&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How DNS&amp;nbsp;works
&lt;/h2&gt;

&lt;p&gt;When a user enters a web address, the browser begins the DNS resolution process which is essentially the process of translating a web address (eg example.com) to an IP address. It first checks the browser DNS cache if the required DNS information is there. If the required information is in the cache, it resolves quickly and the webpage loads faster.&lt;/p&gt;

&lt;p&gt;If the required DNS information is not in the cache, the browser makes a DNS query to a recursive resolver, which is typicaly ran by your network internet service provider or a public service like google's 8.8.8.8 or cloudflare's 1.1.1.1. This resolver then takes responsiblility of getting the DNS information from the right source. This include making a series of network requests to various DNS servers until either the required DNS information is found or there's a timeout.&lt;/p&gt;

&lt;h2&gt;
  
  
  Types of DNS&amp;nbsp;Servers
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Filcb1hqf5c3b7fuwcobj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Filcb1hqf5c3b7fuwcobj.png" alt=" " width="800" height="493"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Recursive Resolver (DNS recursor)&lt;/strong&gt;: A recursive resolver accepts DNS queries from clients (web browsers) and then acts a the middle man between the client and a DNS nameserver. It is the first stop for DNS queries on the network. It either responds with a cached data (if the required information is already in it's cache) or makes a request to a DNS root nameserver. The root name server responds with the IP address of the required TLD nameserver. The recursor then makes a request to the TLD server who then responds with the IP address of the required authoritative nameserver. Lastly (in most case) the recursor makes a request to the authoritative nameserver which responds with the required DNS information. It is called a recursive resolver because it takes responsibility of tracking a website IP address by making a series of requests to other servers until the required information is found. Some recursive resolvers include google's 8.8.8.8 and cloudflare's 1.1.1.1.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Root Nameserver&lt;/strong&gt;: This is the first stop a recursive resolver makes for an uncached DNS query. The root nameserver accepts DNS query from a recursive resolver and responds by directing the recursive resolver to a TLD nameserver based on the extension of that domain (eg&amp;nbsp;.com,&amp;nbsp;.net,&amp;nbsp;.org, etc). There are 13 different IP addresses that serves as DNS root nameservers (but much more physical servers) all managed by the Internet Corporation of Assigned Names and Numbers (ICANN).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Top Level Domain (TLD) Nameserver&lt;/strong&gt;: A TLD nameserver maintains information on all domain names that share a common domain extension (eg&amp;nbsp;.com). A&amp;nbsp;.com TLD nameserver contains information on every website with a&amp;nbsp;.com extension. A TLD nameserver accepts DNS query from a recursive resolver and responds by directing it to the correct authoritative nameserver for that domain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Authoritative Nameserver&lt;/strong&gt;: An authoritative nameserver maintains information specific to the domain it serves (eg example.com). It is usually the last stop for the recursive resolver's DNS lookup journey. It responds with a DNS A record which will contain the IP address of the requested server. In some cases though, it can respond with a CNAME record in which case, the recursive resolver restarts the resolution process for the domain name given in the CNAME record.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  DNS Records
&lt;/h2&gt;

&lt;p&gt;DNS records are instructons that live in the authoritative DNS servers and provide information about the domain including what IP address is associated with that domain and how to handle requests for that domain. Below is an inexhaustive list of some DNS record types:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DNS A Record&lt;/strong&gt;: An A record maps the domain name to the actual IPv4 address of the server that hosts it. Many websites have only one A record though it is possible to have multiple A records pointing to different IP addresses each serving the same content, it is done as a means of &lt;em&gt;&lt;a href="https://www.vmware.com/topics/round-robin-load-balancing" rel="noopener noreferrer"&gt;round robin load balancing&lt;/a&gt;&lt;/em&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DNS AAAA Record&lt;/strong&gt;: An AAAA record maps a domain to an IPv6 address (as opposed to the A record's IPv4 mapping).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;CNAME Record&lt;/strong&gt;: The CNAME (canonical name) record maps a domain name to another domain name rather than an IP address. This triggers a fresh DNS lookup chain to search for the server of the mapped domain. You might ask, why CNAME? In mordern cloud infrastructure, IP addresses are fluid (changing) but hostnames are permanent. If every service require an IP address via an A record, maintaining web applications on cloud infrastructure would be a nightmare because mordern platforms like AWS S3, vercel, heroku, etc continously route traffic through load balancers, auto-scaling groups and changing IP pools. If a server changes from 192.0.2.1 to 192.0.2.10, millions of users would have to manually update their DNS A records but with CNAME, when you route docs.example.com to example.s3.amazonaws.com, AWS can change the underlying server IP thousands of times a day and your link never breaks because it follows the hostname not the IP.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  DNS Caching
&lt;/h2&gt;

&lt;p&gt;DNS caching can help speed up the DNS lookup chain. It involves tempoarily storing the DNS records for some domain names closer to the requestng client to speed up DNS query. DNS records can be cached in different locations each of which will store the DNS record for a certain amount of time determined by the time to live (TTL).&lt;/p&gt;

&lt;p&gt;Web browsers are the first layer of DNS record cache from the client. When a request is made for a DNS record, the browser cache is the first location checked for the requested record. In chrome, you can view the DNS cache here at &lt;em&gt;chrome://net-internals/#dns&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;If the required information isn't in the browser cache, the next stop before making any network request is the operating system DNS cache. The process that handles this is called a stub resolver. The DNS stub resolver uses names and addresses of the host file (a special text file containing DNS entries) to respond to application name resoluton requests. You can find the host file on /etc/hosts on linux.&lt;/p&gt;

&lt;p&gt;The recursive resolver is the last caching layer in the DNS lookup chain. It not only caches DNS records for websites (ie the actual A record) but also the TLD server for various domain names.&lt;/p&gt;

</description>
      <category>backend</category>
      <category>networking</category>
      <category>systemdesign</category>
      <category>buildinpublic</category>
    </item>
  </channel>
</rss>
