Skip to Content
Author's profile photo Lucia Subatin

Get your SSH keys to HANA Express instance in Google Cloud Platform

You’ve been watching this SAP CodeTalk or following this tutorial on how to setup your SAP HANA, express edition, (or HXE) with the Google Cloud Launcher. Now you would like to connect to the instance from some SSH client, such as PuTTY or the console on your Mac or Linux computer.

You need the SSH keys, but where are they? If this is your first project and you have not generated your keys before, chances are that you won’t find them in your .ssh folder as this tutorial indicates:

No need to panic. There’s just one more additional command before you can download your public and private keys.

Open a new gcloud console that is not logged in to the virtual machine using the “prompt” icon on the top-right corner:


Take note of the name of your VM and use it to replace accordingly in the following command:

gcloud compute ssh <<YOUR VM NAME>>

It will ask for confirmation, issue a couple of warnings about not having any keys, ask for a passphrase (please use something you will remember) and finally confirm that your keys have been generated:

Notice that it has logged you into the VM. In order to retrieve the keys, open a new gcloud console to fetch them from the project home folder:

Go into your /home/<<google_user_id>>/.ssh and use the download icon to fetch your private and public SSH keys:


Now you can connect from another console in your Mac or Linux computer using your key with:

ssh -i ~/.ssh/my-ssh-key your_gmail_user_name@external_vm_IP_address

or using PuTTY or WinSCP to transfer files from your Windows computer. More information on the latter or If you are getting an error like Unable to use key file “some path and private key” (OpenSSH SSH-2 private key) in this tutorial.


I’d love to know what you develop with your HXE instance, let us connect on  or on LinkedIn !

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      This is some great stuff and it is worth sharing. I was looking for the SSH keys and this was very helpful. This would help software development company and agencies too. Keep up the good work.

      Author's profile photo Former Member
      Former Member

      Wow! Hi Miss @Lucia Subatin, thank you very much for such as a very helpful article. No doubt the SSH keys are very valuable for identifying ourselves to an SSH server. Due to this modern web design companies can maintain the integrity of their business data with ease.

      Author's profile photo Jon Gooding
      Jon Gooding

      Thanks for this! Just to add if you are using putty;

      1. The file google_compute_engine needs to be saved as a google_compute_engine.pem
      2. Then run the puttygen.exe to convert it to a google_compute_engine.ppk

      Then you are good to go in 3rd party putty.



      Author's profile photo Brandi Hickey
      Brandi Hickey

      Thanks for such helpful little tutorial! This could be also very helpful for mobile app developers as everyone want to be secure in the net.

      Author's profile photo Usman khan
      Usman khan

      Amazing source of learning thanks for sharing..




      Author's profile photo Irfan shariff
      Irfan shariff

      thank you for the article .... i was having difficulty downloading the ssh file using the icon hence used the below command

      cloudshell download google.compute.engine.

      Author's profile photo Crux Media
      Crux Media

      well written article!