Connecting Securely to Google Cloud VM Instance With SSH Keys

There are several ways to transfer files to your VM instance, using WinSCP for Secure Copy Protocol (SCP) is one of them.

Create SSH keys to the instance using PuTTY.

Download putty.exe, if you don’t have it.
Open PuTTY Key Generator
Generate the keys
In Key comment field create a user name for your connection
Create Key passphrase (optional)
Save private key on your local machine
Copy your Public key from the field

In Google Cloud Console click on your instance, then click Edit

Scroll to SSH Keys, click Show and edit, + Add item
Enter Public SSH Key you copied before in PuTTY

Click Save.

Connecting to the instance using WinSCP.

Download WinSCP, if you don’t have it.
In Google Cloud Console copy the External IP on your instance

Open WinSCP and create a new connection
Choose SCP for the File protocol
In the Host name field paste the External IP you copied before
Type the User name you created in PuTTY

Click Advanced
SSH
> Authentication
In Private key file field point path to your Private key on your local machine

Next, click Enviroment > SCP/Shell
In Shell drop-down list choose sudo su -

Click OK

Now click Save and Login to your Instance.

--

--

--

Lead Web Developer at Vue Health. Husband of a wonderful wife, Entrepreneur, Dad

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Storage Pointers in Solidity

AEM in the Cloud

Security Tips For Writing Smart Contracts with the Practice

Serverless architecture for COVID-19 time series data by John Hopkins University — AWS

IOTA: Multisig Explained

What’s in a (Python’s) __name__?

Container registries comparison

Chain of Responsibility Design Pattern

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Max Shestov

Max Shestov

Lead Web Developer at Vue Health. Husband of a wonderful wife, Entrepreneur, Dad

More from Medium

Building AWS Amplify app on a GoDaddy domain

Learn How To Get the File name and File ID From Google Drive In Apps Script

Google Apps Script — Getting File Name And Id From Google Drive Files

DigitalOcean vs. Google Cloud vs. AWS vs. Linode vs. Vultr: Which Is Best for WordPress Hosting?

How to Create GCP Image using GCLOUD Command