TAGS

There are no tags associated with this article.

Connecting to a Windows VM via RDP through a Linux bastion host (port forwarding)

Requirements:

Linux virtual machine with ssh access – bastion host

Windows VM located in the same network as bastion host

The private key downloaded from OpenStack dashboard converted from .pem to .ppk format (using “PuTTYgen”)

The password for Administrator account has been changed via OpenStack dashboard Console

Make sure your VMs are assigned the following security groups:

Windows VM – allow_rdp (ingress 3389)

Bastion – allow_ssh_ping

../../_images/01.png

Step 1. Information required to establish connection with bastion host.

Launch PuTTY application and change the settings according to instructions:

session tab: Provide host (bastion) floating IP address and SSH port (default 22).

../../_images/11b.PNG

connection > data tab: set auto-login username as “eouser”.

../../_images/02b.PNG

connection > SSH > Auth: select private key in .ppk format.

../../_images/03b.PNG

connection > SSH > Tunnels: provide source port for localhost RDP connection and destination (private IP address of Windows VM : RDP port).

../../_images/04b.PNG

Click “Add” button to confirm changes.

Your forwarded port should be now visible now in the upper tab.

../../_images/05b.PNG

Provide name of session and save your config, to avoid repeating whole process every time you’d like to connect with an instance again.

../../_images/10b.PNG

Step 2. Open connection in PuTTy

Click “Open” to establish connection.

../../_images/06b.PNG

Step 3. Start an RDP session to localhost to reach the destination server

set localhost address:port selected in step 2 (in this case 127.0.0.1:8888 or localhost:8888 if you prefer)

set username as “Administrator”

../../_images/07b.PNG

Click “Connect” and enter your VM’s administrator password(the one you’ve set in OpenStack console). 

../../_images/08b.PNG

Confirm connection in the certificate prompt.

../../_images/09b.PNG

That’s it, you’re now successfully connected to your Windows VM!

../../_images/113.png