Skip to Content
Author's profile photo Ashitha MS

Using HCP Virtual Machines to use R with SAP HANA running on HCP – Part 2

As outlined in the first blog, we will now login to the HCP Virtual Machine using PuTTY.


  • You should have downloaded Putty zip file and extracted it to “C:\Work\putty”.
  • You should have downloaded openSSL and extracted it to “C:\Work\openssl”.

The default key that was created in the previous video was of the format testvm.key. Since this is not accepted by the SSH client Putty, we need it to convert the key to the format that PuTTY accepts.

Generate the correct key format for PuTTY

Step Screenshot

1. Navigate to the openssl folder.

cd C:\Work\openssl\bin

2. Execute this command:openssl.exe rsa -in “C:\Work\SDK\tools\testvm.key” -out testvm.pem  

3. The command will prompt for passphrase. Enter the passphrase that you gave to encrypt the key previously.

Note: You will now have a file named testvm.pem under the bin folder.

4. Navigate to the C:\Work\putty folder and double click on puttygen.exe.  
5. Click on Conversions and then on Import key.  
6. Select the C:\Work\openssl\bin\testvm.pem file and then click Open.  

7. Enter the Key passphrase to encrypt the key.

Confirm the passphrase and click on “Save private key”.

9. Save the private key in the following location “C:\Work\openssl\bin”
and save the file as testvm.ppk.

You have successfully created Virtual Machine, along with it there are two files that are available on your system testvm.key and testvm.ppk.

Login to the HCP Virtual Machine using PuTTY
In this step,  we will login to the  HCP virtual machine using PuTTY

Step Screenshot
1. Double click on “putty.exe” under C:\Work\putty

2.Provide the following details:Hostname: root@localhost

Port: The port number that is generated for you.

3. Double click on “Auth” under “SSH”.  
4. Select the file testvm.ppk from “C:\Work\openssl\bin\testvm.ppk”  

5. Click on “Session” and “Open”.

6. Press “Yes” when the prompt asks to proceed.

7. Provide the passphrase that you gave to encrypt the key previously and press Enter.  
8. You are logged in to the VM as root user.  

Congratulations! You are now connected to the virtual machine.

Summary: You have used PUTTY to connect to the Virtual Machine in HCP and logged in to it as root user.


Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.