<?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: Mahajurul Karim</title>
    <description>The latest articles on DEV Community by Mahajurul Karim (@inversemaha).</description>
    <link>https://dev.to/inversemaha</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%2F3873281%2F3520fafe-8979-444a-aee1-32d7428d7a76.jpg</url>
      <title>DEV Community: Mahajurul Karim</title>
      <link>https://dev.to/inversemaha</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/inversemaha"/>
    <language>en</language>
    <item>
      <title>🚀 How I Configured SSH Access from My Local Linux Mint to a VPS</title>
      <dc:creator>Mahajurul Karim</dc:creator>
      <pubDate>Sat, 11 Apr 2026 09:58:13 +0000</pubDate>
      <link>https://dev.to/inversemaha/how-i-configured-ssh-access-from-my-local-linux-mint-to-a-vps-5ghp</link>
      <guid>https://dev.to/inversemaha/how-i-configured-ssh-access-from-my-local-linux-mint-to-a-vps-5ghp</guid>
      <description>&lt;h1&gt;
  
  
  🚀 How I Configured SSH Access from My Local Linux Mint to a VPS
&lt;/h1&gt;

&lt;p&gt;A clean DevOps-style SSH setup for secure and fast server access.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧠 Architecture Overview (Diagram)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;flowchart LR
    A[Local Linux Mint Machine] --&amp;gt; B[SSH Key Pair]
    B --&amp;gt; C[Private Key: moti-dig-1]
    B --&amp;gt; D[Public Key: moti-dig-1.pub]

    D --&amp;gt; E[VPS Server]
    E --&amp;gt; F[~/.ssh/authorized_keys]

    A --&amp;gt;|ssh moti-dig-1| E
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🔐 Step 1: Generate SSH Key (Custom Name)
&lt;/h2&gt;

&lt;p&gt;Instead of default keys like &lt;code&gt;id_rsa&lt;/code&gt;, I created a dedicated key for this server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh-keygen &lt;span class="nt"&gt;-t&lt;/span&gt; ed25519 &lt;span class="nt"&gt;-C&lt;/span&gt; &lt;span class="s2"&gt;"moti-dig-1"&lt;/span&gt; &lt;span class="nt"&gt;-f&lt;/span&gt; ~/.ssh/moti-dig-1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;~/.ssh/moti-dig-1&lt;/code&gt; → Private key&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;~/.ssh/moti-dig-1.pub&lt;/code&gt; → Public key&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📤 Step 2: Copy Public Key to VPS
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh-copy-id &lt;span class="nt"&gt;-i&lt;/span&gt; ~/.ssh/moti-dig-1.pub &lt;span class="nt"&gt;-p&lt;/span&gt; 44 root@165.22.104.176
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This installs the public key into:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/.ssh/authorized_keys
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;on the VPS.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧪 Step 3: Test SSH Connection
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh &lt;span class="nt"&gt;-i&lt;/span&gt; ~/.ssh/moti-dig-1 &lt;span class="nt"&gt;-p&lt;/span&gt; 44 root@165.22.104.176
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once successful, we move to automation.&lt;/p&gt;




&lt;h2&gt;
  
  
  ⚙️ Step 4: SSH Config for Clean Access
&lt;/h2&gt;

&lt;p&gt;Edit SSH config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nano ~/.ssh/config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Host moti-dig-1
    HostName 165.22.104.176
    User root
    Port 44
    IdentityFile ~/.ssh/moti-dig-1
    StrictHostKeyChecking accept-new
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  ⚡ Step 5: Connect with Simple Command
&lt;/h2&gt;

&lt;p&gt;Now access the server with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ssh moti-dig-1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No IP, no port, no key flags.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔒 Security &amp;amp; Best Practices
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;code&gt;ed25519&lt;/code&gt; keys (modern &amp;amp; secure)&lt;/li&gt;
&lt;li&gt;Keep one key per server/project&lt;/li&gt;
&lt;li&gt;Use SSH config for clean workflow&lt;/li&gt;
&lt;li&gt;Set proper permissions:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;chmod &lt;/span&gt;600 ~/.ssh/moti-dig-1
&lt;span class="nb"&gt;chmod &lt;/span&gt;600 ~/.ssh/config
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🚀 Final Thoughts
&lt;/h2&gt;

&lt;p&gt;This setup improves:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Security 🔐&lt;/li&gt;
&lt;li&gt;Productivity ⚡&lt;/li&gt;
&lt;li&gt;Maintainability 🧹&lt;/li&gt;
&lt;li&gt;DevOps readiness ☁️&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;If you manage multiple servers, this setup is a must-have for scaling your workflow like a professional DevOps engineer.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>webdev</category>
      <category>vps</category>
    </item>
  </channel>
</rss>
