Overview
The most important thing is to access the Virtual machine after provisioning in Google Cloud. There are different methods for different OS like Windows and Linux systems to connect them. For Beginner, It is a bit time taking to understand how to access google cloud virtual machine or generate google cloud ssh puttykey because it has important and complex steps that need to complete before connect. So, don’t worry I will give you a complete guide to access the virtual machine immediately after deployment. So, here we will discuss only to connect Linux virtual machine through SSH in Google Cloud using PuTTY Client.
Know About SSH
SSH is known as Secure Shell or you can say Secure Socket Shell. This network protocol gives system administrators a secure path to access the server over an unsecured network. Secure Shell uses a strong authentication method by using the public key which opens with a private key for complete authentication. Finally, encrypted communication establishes between two systems.
Apart from providing strong encryption, System administrators use SSH for managing servers, computers, and applications remotely and give them the power to log in to another computer over a network, and they can execute various commands and manage or move files from one computer to another.
How SSH works
It is really interesting to know how SSH works. I will keep it short and give you a basic idea which you can understand without any confusion. There are Lock and key that we are using in our home. So when you lock out your home, Can anyone open that with other keys?
The answer is No! Right? So, consider your Lock as Public key and key as a Private key. Now, You can apply the same theory for SSH policy also. The computer will have a public key and we will have a private key when we present the private key to that computer, It will check the key for authentication. See, How simple is it. Now the question comes, How can we get Public key and Private key, also How can we connect VM in google cloud through SSH by setting up these public and private keys.
||STEP-1|| Generate Public key and Private Key
The first step is to generate google cloud ssh puttykey. There is various tool, we can use for the same. I recommend PuTTY which is an open-source tool and easy to use SSH client. You can download PuTTY tool with below link
[su_button url=”https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html” target=”blank” style=”flat” size=”6″ center=”yes”]Download Putty Client[/su_button]
Please download putty client and install in your system, the next step is creating public and private keys.
|| STEP-2 || Generate Public and Private key
Go to the Windows search box and type “putty” and click on PuTTYgen as given below,
Now, Click on “Generate” button and hover the mouse over the application continuously to generate the Public Key. Now Copy the Public key in a text file (Recommended) or you can save the file as shown below, if you want to change the username then you can set in “key comment” then copy the public key.
-> Also, Save the Private key now. Now login to Google cloud console and head to the compute section.
Click on the VM name to edit.
Click on edit option and scroll down to SSH Section.
Exapand the “Show and Edit” and paste the public key as shown below.
After pasting the key, scroll down to the bottom and click on SAVE. Now you have successfully configured the SSH public key in Google Cloud Virtual machine. Next part is accessing Linux VM through SSH.
||STEP-3|| Access Google Cloud VM through SSH
Now search and open the putty tool in windows and copy the public IP of the VM. Make sure the port 22 is opened for public or specific to your IP.
Check the screenshot below,
Next is to attach the private key to putty to access the VM Console. Now, Expand “SSH” option from the sidebar.
Then click on “AUTH”, Don’t expand it and browse the private key as shown above and hit OK after selecting the public key.
Hit Yes.
Clap for you! Now you made the connection to your Linux VM through SSH successfully in Google cloud. It is very easy, Just we need to know the right steps to get it done.
Some Important Post regarding Cyberpanel,
- Step by Step installing of Cyberpanel in Google Cloud | The Free Hosting Solution
- How to Secure Cyberpanel and PHPMyAdmin in Google Cloud – The Full Guide
- Connect Linux VM through SSH Securely in Google Cloud?
- How to access Openlitespeed Webserver Panel Securely in Google Cloud/ Azure /AWS ?