Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Getting Your HANA Express SSH Keys in GCP

DZone's Guide to

Getting Your HANA Express SSH Keys in GCP

If you have set up a project in the past, here's a quick guide to find your SAP HANA Express Edition SSH keys when working with Google Cloud Platform.

· Cloud Zone
Free Resource

Are you joining the containers revolution? Start leveraging container management using Platform9's ultimate guide to Kubernetes deployment.

So, you’ve been watching this SAP CodeTalk or following this tutorial on how to set up 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 you can use PuTTY or WinSCP to transfer files from your Windows computer. If that's more your style, you can find more information and solve errors like Unable to use key file “some path and private key” (OpenSSH SSH-2 private key) in this tutorial.

Using Containers? Read our Kubernetes Comparison eBook to learn the positives and negatives of Kubernetes, Mesos, Docker Swarm and EC2 Container Services.

Topics:
cloud ,sap hana ,google cloud platform ,ssh keys ,tutorial

Published at DZone with permission of Lucia Subatin, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}