Skip to Content

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 !

You must be Logged on to comment or reply to a post.
  • 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.

  • 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.

  • 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.



  • 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.

  • 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.

  • We, as a real estate solution provider are available at your service. We buy houses. We can buy your house for cash in Tulsa, Oklahoma City, Broken Arrow, Norman, Lawton, Edmond, Jenks, Owasso, Coweta, and many other cities in Oklahoma. We want to give you a fair deal, so you can do something worthy with your unwanted property. We are ready to purchase your house regardless of any conditions. We offer a fast yet reliable service to anyone who comes through our doors. We provide a hassle+H45+H45-free and straightforward procedure that has made selling and buying houses easier than before. Sell my house fast tulsa
    for contact: 918-770-7886

  • Do you want to pull off a striking outfit? Invest in great quality leather jackets. To your surprise, we have a huge collection of different style jackets. More importantly, these jackets are available in stunning and eye-pleasing colors that make you stand out in the crowd. And what if we tell you that our jacket collection is crafted according to the needs of current fashion trends? So, don’t wait for the winter season to pair jackets with your look. You can achieve the chic and trendy vibes wearing our jackets during any season.