<?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: Ahmad Majeed Zahoory</title>
    <description>The latest articles on DEV Community by Ahmad Majeed Zahoory (@ahmadzahoory).</description>
    <link>https://dev.to/ahmadzahoory</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%2F2745867%2F7a1eb962-3609-41c8-88b6-41632ce8d7d5.jpg</url>
      <title>DEV Community: Ahmad Majeed Zahoory</title>
      <link>https://dev.to/ahmadzahoory</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ahmadzahoory"/>
    <language>en</language>
    <item>
      <title>Different Methods to Connect to a AWS Linux Compute Engine Instance</title>
      <dc:creator>Ahmad Majeed Zahoory</dc:creator>
      <pubDate>Thu, 23 Jan 2025 10:55:03 +0000</pubDate>
      <link>https://dev.to/ahmadzahoory/different-methods-to-connect-to-a-aws-linux-compute-engine-instance-31ek</link>
      <guid>https://dev.to/ahmadzahoory/different-methods-to-connect-to-a-aws-linux-compute-engine-instance-31ek</guid>
      <description>&lt;p&gt;&lt;strong&gt;Step 1: Connect via ssh using Key pair&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Process:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a key pair in the .ppk format (or .pem format if you need an alternative to using an SSH tool) and download the private key to your local desktop or laptop.&lt;/li&gt;
&lt;li&gt;Attach the Key pair during the creation of the AWS virtual machine.&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2F2wvv6mn5d21asuldpjnx.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.amazonaws.com%2Fuploads%2Farticles%2F2wvv6mn5d21asuldpjnx.png" alt="Image-1" width="527" height="89"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Copy the Public IP of the virtual machine.&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2Fokjdigqhqc2cswhh30lr.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.amazonaws.com%2Fuploads%2Farticles%2Fokjdigqhqc2cswhh30lr.png" alt="Image-2" width="523" height="100"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Follow these steps to connect to a Linux instance:&lt;/li&gt;
&lt;li&gt;Launch PuTTY or another compatible tool.&lt;/li&gt;
&lt;li&gt;Expand Connection &amp;gt; SSH &amp;gt; Auth and select credentials.&lt;/li&gt;
&lt;li&gt;Click Browse and locate your private key file.&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2Fody2uwiwd1nplihq86ik.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.amazonaws.com%2Fuploads%2Farticles%2Fody2uwiwd1nplihq86ik.png" alt="Image-3" width="467" height="458"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Linux terminal will open and ask for a username. Enter the appropriate username based on the Linux distribution (e.g., "ec2-user" for Amazon Linux or "ubuntu" for Ubuntu).&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2Fedtvgmro6ajv8fysv0hq.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.amazonaws.com%2Fuploads%2Farticles%2Fedtvgmro6ajv8fysv0hq.png" alt="Image-4" width="526" height="236"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Connect via ssh using own SSH Key defined in the Key pair&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Process:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On your local machine, generate an SSH key pair.&lt;/li&gt;
&lt;li&gt;Save public key and private key, on your local machine.&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2Fvi0klip32c7pursr1diy.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.amazonaws.com%2Fuploads%2Farticles%2Fvi0klip32c7pursr1diy.png" alt="Image-5" width="527" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to the Key pair page and choose "Actions"&lt;/li&gt;
&lt;li&gt;Click on "Import Key Pair" and add your public key&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2Fqvhsn4j8xg2coanc2nei.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.amazonaws.com%2Fuploads%2Farticles%2Fqvhsn4j8xg2coanc2nei.png" alt="Image-6" width="527" height="412"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Attach the Key pair during the creation of the AWS virtual machine.&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2F5z240d4wzg1fxstg8eto.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.amazonaws.com%2Fuploads%2Farticles%2F5z240d4wzg1fxstg8eto.png" alt="Image-7" width="527" height="89"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Copy the Public IP of the virtual machine.&lt;/li&gt;
&lt;li&gt;Follow these steps to connect to a Linux instance:&lt;/li&gt;
&lt;li&gt;Launch PuTTY or another compatible tool.&lt;/li&gt;
&lt;li&gt;Expand Connection &amp;gt; SSH &amp;gt; Auth and select credentials.&lt;/li&gt;
&lt;li&gt;Click Browse and locate your private key file.&lt;/li&gt;
&lt;li&gt;The Linux terminal will open and ask for a username. Enter the appropriate username based on the Linux distribution (e.g., "ec2-user" for Amazon Linux or "ubuntu" for Ubuntu).&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2Fabeoy109v7e6d9bcqvh8.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.amazonaws.com%2Fuploads%2Farticles%2Fabeoy109v7e6d9bcqvh8.png" alt="Image-8" width="525" height="250"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Connect via AWS Console&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Process:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create the AWS virtual machine.&lt;/li&gt;
&lt;li&gt;Go to the EC2 page and select "Instances."&lt;/li&gt;
&lt;li&gt;Find your Linux virtual machine and click "Connect."&lt;/li&gt;
&lt;li&gt;Choose "EC2 Instance Connect" and then "Connect using EC2 Instance Connect."&lt;/li&gt;
&lt;li&gt;Finally, click "Connect".&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2Fhiyflm3cg8xn3g0uxy05.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.amazonaws.com%2Fuploads%2Farticles%2Fhiyflm3cg8xn3g0uxy05.png" alt="Image-9" width="526" height="362"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A browser-based terminal will launch, providing direct access to the instance.&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2F3a5g8t578nm12i5ikaxj.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.amazonaws.com%2Fuploads%2Farticles%2F3a5g8t578nm12i5ikaxj.png" alt="Image-10" width="525" height="288"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Connect via AWS System manager&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Process:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create an IAM role and attach the "AmazonSSMManagedInstanceCore" policy.&lt;/li&gt;
&lt;li&gt;Attach the IAM role while creating the AWS virtual machine.&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2Fl46rmogin7tlvagx42h1.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.amazonaws.com%2Fuploads%2Farticles%2Fl46rmogin7tlvagx42h1.png" alt="Image-11" width="478" height="149"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to the System Manager page and choose "Session Manager"&lt;/li&gt;
&lt;li&gt;Click on "Start Session."&lt;/li&gt;
&lt;li&gt;Wait until the Linux instance appears, then select it and click "Start Session."&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2F493vkltpoa9z3idyawn5.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.amazonaws.com%2Fuploads%2Farticles%2F493vkltpoa9z3idyawn5.png" alt="Image-12" width="525" height="307"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A browser-based terminal will launch, providing direct access to the instance.&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2Flqddenkisjum0sq79eah.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.amazonaws.com%2Fuploads%2Farticles%2Flqddenkisjum0sq79eah.png" alt="Image-13" width="525" height="252"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Connect via ssh using password&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Process:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;While creating the Linux virtual machine.&lt;/li&gt;
&lt;li&gt;In the Advanced details section:&lt;/li&gt;
&lt;li&gt;Copy the script below (adjust it according to your Linux distribution) under user data.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash
echo 'lab-password' | passwd ec2-user --stdin
sed -i 's|[#]*PasswordAuthentication no|PasswordAuthentication yes|g' /etc/ssh/sshd_config
systemctl restart sshd.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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.amazonaws.com%2Fuploads%2Farticles%2Fwjxbr97hldtyfkfv0091.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.amazonaws.com%2Fuploads%2Farticles%2Fwjxbr97hldtyfkfv0091.png" alt="Image-14" width="527" height="412"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Copy the Public IP of the virtual machine.&lt;/li&gt;
&lt;li&gt;Follow these steps to connect to a Linux instance:&lt;/li&gt;
&lt;li&gt;Launch PuTTY or another compatible tool.&lt;/li&gt;
&lt;li&gt;The Linux terminal will open and ask for a username and password. Enter the appropriate username based on the Linux distribution (e.g., "ec2-user" for Amazon Linux or "ubuntu" for Ubuntu) and password.&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2Ffzhrzlgi6iyar1cbq32e.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.amazonaws.com%2Fuploads%2Farticles%2Ffzhrzlgi6iyar1cbq32e.png" alt="Image-15" width="523" height="246"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aws</category>
      <category>linux</category>
      <category>ssh</category>
      <category>ec2</category>
    </item>
    <item>
      <title>Different Methods to Connect to a GCP Linux Compute Engine Instance</title>
      <dc:creator>Ahmad Majeed Zahoory</dc:creator>
      <pubDate>Thu, 23 Jan 2025 10:33:00 +0000</pubDate>
      <link>https://dev.to/ahmadzahoory/different-methods-to-connect-to-a-gcp-linux-compute-engine-instance-37ap</link>
      <guid>https://dev.to/ahmadzahoory/different-methods-to-connect-to-a-gcp-linux-compute-engine-instance-37ap</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Connect to a GCP Linux Compute Engine Instance&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Google Cloud Platform (GCP) offers a robust and scalable infrastructure, and one of its core services is the Compute Engine, which provides virtual machines (VMs) running on Google’s infrastructure. &lt;/p&gt;

&lt;p&gt;Connecting to a Linux-based Compute Engine instance is a common task for developers and system administrators. &lt;/p&gt;

&lt;p&gt;This blog will guide you through the process, step by step.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Connect via Google Cloud Console&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Process:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Create Google Linux compute engine.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Navigate to the VM instances page: VM Instances.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Locate your Linux VM and click the SSH button in the corresponding row.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click on Open in browser window.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2Fm9rmbwkx7rahgz6t561m.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.amazonaws.com%2Fuploads%2Farticles%2Fm9rmbwkx7rahgz6t561m.png" alt="Image-1" width="602" height="315"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A browser-based terminal will open, connecting you directly to the instance.&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2Ffaofqo4ze4yip1izqhlu.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.amazonaws.com%2Fuploads%2Farticles%2Ffaofqo4ze4yip1izqhlu.png" alt="Image-2" width="602" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Connect via gcloud CLI using CloudShell&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Process:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create Google Linux compute engine.&lt;/li&gt;
&lt;li&gt;Open the Cloud shell terminal.&lt;/li&gt;
&lt;li&gt;To connect to the Linux instance, use the command:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud compute ssh [INSTANCE_NAME] --zone=[ZONE]
- Replace [INSTANCE_NAME] with the name of your instance and [ZONE] with its zone (e.g., us-central1-a)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The Linux terminal will open, establishing a direct connection to the instance.&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2Fa0vmfh4huea175az8v7c.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.amazonaws.com%2Fuploads%2Farticles%2Fa0vmfh4huea175az8v7c.png" alt="Image-3" width="602" height="553"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Connect via gcloud CLI using gcloud SDK&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Process:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Create Google Linux compute engine.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Follow these steps to connect to a Linux instance:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Install the Google Cloud SDK on your workstation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open the command line interface in your workstation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Authenticate to google using:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud auth login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Set the default Google Cloud project using:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud config set project [PROJECT_ID]
- Replace [PROJECT_ID] with the ID of your Google Cloud project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To connect to the Linux instance, use the command:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;gcloud compute ssh [INSTANCE_NAME] --zone=[ZONE]
- Replace [INSTANCE_NAME] with the name of your instance and [ZONE] with its zone (e.g., us-central1-a)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;The Linux terminal will open, establishing a direct connection to the instance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Connect via ssh using own SSH Key defined in the Project metadata&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Process:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On your local machine, generate an SSH key pair.&lt;/li&gt;
&lt;li&gt;Use the key comment as the login name for Linux Compute Engine.&lt;/li&gt;
&lt;li&gt;Save public key and private key, on your local machine.&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2Fjke8xy5ty9th1h8x88qd.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.amazonaws.com%2Fuploads%2Farticles%2Fjke8xy5ty9th1h8x88qd.png" alt="Image-4" width="478" height="470"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to Compute engine &amp;gt; Metadata.&lt;/li&gt;
&lt;li&gt;Click the SSH Keys --&amp;gt; Click Add SSH Key --&amp;gt; Select Add Item.&lt;/li&gt;
&lt;li&gt;Copy the Public Key.&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2F6jjan5gcfhkdqjt9wg39.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.amazonaws.com%2Fuploads%2Farticles%2F6jjan5gcfhkdqjt9wg39.png" alt="Image-5" width="526" height="299"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Copy the External/ Internal IP of the compute engine.&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2Fypnibp3xbvo9d2qoisub.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.amazonaws.com%2Fuploads%2Farticles%2Fypnibp3xbvo9d2qoisub.png" alt="Image-6" width="602" height="172"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Follow these steps to connect to a Linux instance:&lt;/li&gt;
&lt;li&gt;Launch PuTTY or another compatible tool.&lt;/li&gt;
&lt;li&gt;Expand Connection &amp;gt; SSH &amp;gt; Auth and select credentials.&lt;/li&gt;
&lt;li&gt;Click Browse and locate your private key file.&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2Fha7r3xh6l59fa3l0c1dj.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.amazonaws.com%2Fuploads%2Farticles%2Fha7r3xh6l59fa3l0c1dj.png" alt="Image-7" width="467" height="458"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Linux terminal will open and prompt you for a username. Enter the username to connect to the instance.&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2F248qhcob2efo63zuvyka.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.amazonaws.com%2Fuploads%2Farticles%2F248qhcob2efo63zuvyka.png" alt="Image-8" width="602" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Connect via ssh using own SSH Key defined in the Compute Engine&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Process:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;On your local machine, generate an SSH key pair.&lt;/li&gt;
&lt;li&gt;Use the key comment as the login name for Linux Compute Engine.&lt;/li&gt;
&lt;li&gt;Save public key and private key.&lt;/li&gt;
&lt;li&gt;Create Google Linux compute engine.&lt;/li&gt;
&lt;li&gt;In the Security section:&lt;/li&gt;
&lt;li&gt;Select Add Item, under Add manually generated SSH keys.&lt;/li&gt;
&lt;li&gt;Copy the Public Key.&lt;/li&gt;
&lt;/ul&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.amazonaws.com%2Fuploads%2Farticles%2Ffwyo2a1s38b0gz891j6s.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.amazonaws.com%2Fuploads%2Farticles%2Ffwyo2a1s38b0gz891j6s.png" alt="Image-9" width="602" height="174"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Copy the External/ Internal IP of the compute engine.&lt;/li&gt;
&lt;li&gt;Follow these steps to connect to a Linux instance:&lt;/li&gt;
&lt;li&gt;Launch PuTTY or another compatible tool.&lt;/li&gt;
&lt;li&gt;Expand Connection &amp;gt; SSH &amp;gt; Auth and select credentials.&lt;/li&gt;
&lt;li&gt;Click Browse and locate your private key file.&lt;/li&gt;
&lt;li&gt;The Linux terminal will open and prompt you for a username. Enter the username to connect to the instance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Connect via ssh using own username and password&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Process:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create Google Linux compute engine.&lt;/li&gt;
&lt;li&gt;In the Advanced section:&lt;/li&gt;
&lt;li&gt;Copy the script below (adjust it according to your Linux distribution) under Startup script.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$sec_pass = ConvertTo-SecureString -String "lab-password@123" -AsPlainText -Force
New-LocalUser -Name gcpadmin -PasswordNeverExpires -Password $sec_pass
Add-LocalGroupMember -Group Administrators -Member gcpadmin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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.amazonaws.com%2Fuploads%2Farticles%2Feniemkdougeaq9r5lsph.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.amazonaws.com%2Fuploads%2Farticles%2Feniemkdougeaq9r5lsph.png" alt="Image-10" width="602" height="135"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Copy the External/ Internal IP of the compute engine.&lt;/li&gt;
&lt;li&gt;Follow these steps to connect to a Linux instance:&lt;/li&gt;
&lt;li&gt;Launch PuTTY or another compatible tool.&lt;/li&gt;
&lt;li&gt;The Linux terminal will open and prompt you for a username and password. Enter the username and password to connect to the instance.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>googlecloud</category>
      <category>cloudcomputing</category>
      <category>linux</category>
      <category>ssh</category>
    </item>
  </channel>
</rss>
