https://clramirez.com/wp-content/uploads/22-how-to-google-cloud.jpg
SHARE
https://clramirez.com

With Google Cloud Platform you get $300 FREE simply by signing up. The word “Cloud” gets thrown around a lot, and it scares some people. I’ll show you how easy it is to create your first VM in Google Cloud Platorm. First you’ll obviously need to create an account, and then log in.

Here is an article to help you signup:

After you get signed up you will then need to create a Project, but Google Cloud Platform creates an initial one for you. 

Finally you are ready to create your first VM.

  • Click the menu bar on the top left and then click COMPUTE ENGINE

  • Click CREATE

  • Here you can see I have already used some of my FREE $300

  • You will need to perform the following:
    • NAME your VM
    • Pick a REGION & ZONE
    • SELECT the number of PROCESSORS & amount of RAM

  • Next you will need to choose the OS you will install for your VM

  • For this demonstration I will select CentOS 7, with a 100 GB STANDARD PERSISTENT DISK. You can select SSD, but it is EXPENSIVE.

  • Next select ALLOW FULL ACCESS TO ALL CLOUD APIs (if you want to use Google APIs for this machine in the future), and enable HTTP/HTTPS traffic if you intend on making a website/application publicly accessible over port 80 & 443.

  • Click the link titled “MANAGEMENT, SECURITY, DISKS, NETWORKING, SOLE TENANCY”

  • Click NETWORKING, and then click the PENCIL icon to EDIT

  • Click EXTERNAL IP ADDRESS, and select CREATE IP ADDRESS from the drop-down

  • Select a NAME for your STATIC IP ADDRESS, and choose STANDARD. (Premium has added benefits, but will eat into our FREE $300)

  • After the key-pair has been created you will need to:
    • Pay special attention to KEY COMMENT, and/or update it with the USERNAME you prefer (you’ll see why later)
    • Right click to SELECT ALL in the PUBLIC KEY area and COPY
    • SAVE the PUBLIC KEY as [ENTER-NAME-PUBLIC-KEY].ppubk
    • SAVE the PRIVATE KEY as [ENTER-NAME-PRIVATE-KEY].ppk

  • You have the option to enter a Key Passphrase and you can enter one if you like, for this demonstration I chose not to enter one

  • Back in the Google Cloud Platform Console you will select the SECURITY tab and paste the PUBLIC key you copied from PuTTY Key Generator. You can look around at other options, but we are ready to CREATE our new VM

  • You can see the external IP ADDRESS and next to it you can click SSH to access Google Cloud SSH Console, or click the drop-down to connect via other options

 

  • Here is what the Google Cloud SSH Console looks like

  • Open WinSCP (Download WinSCP) and input your PUBLIC IP ADDRESS, USER NAME (Key Comment from PuTTY Key Generator), and click ADVANCED

  • You will need to choose AUTHENTICATION under the SSH section, and navigate/select your PRIVATE KEY FILE

  • Before clicking LOGIN be sure to click SAVE. Afterwards click LOGIN and you should see the warning “Continue connecting to an unknown server and add its host key to a cache?” Choose YES.

  • If you installed PuTTY, you can have PuTTY automatically open with each new session you connect to from WinSCP by updating the following (CTRL + ALT + P) or (Options > Preferences), then choose Applications (4th option from the bottom), Browse to the installation path for PuTTY.exe, and choose the options you want below it.

  • You have successfully created a VM in Google Cloud (CentOS 7 VM and enabled SSH access using your PUBLIC/PRIVATE key-pair) 
  • In addition, you have the best of both worlds:
    • Being able to navigate your CentOS 7 VM using a “GUI” per-say with WinSCP. This will allow you to easily transfer data to/from your newly created server
    • SSH Terminal Access via PuTTY
  • If you close your PuTTY session or it disconnects you can always reopen it when you reconnect using WinSCP, or if WinSCP is still connected simply click the TERMINAL icon highlighted in the picture

SHARE
https://clramirez.com

Leave a Reply

Your email address will not be published. Required fields are marked *