Connecting to a Windows VM via RDP through a Linux bastion host (port forwarding)
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
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).
connection > data tab: set auto-login username as “eouser”.
connection > SSH > Auth: select private key in .ppk format.
connection > SSH > Tunnels: provide source port for localhost RDP connection and destination (private IP address of Windows VM : RDP port).
Click “Add” button to confirm changes.
Your forwarded port should be now visible now in the upper tab.
Provide name of session and save your config, to avoid repeating whole process every time you’d like to connect with an instance again.
Step 2. Open connection in PuTTy
Click “Open” to establish connection.
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”
Click “Connect” and enter your VM’s administrator password(the one you’ve set in OpenStack console).
Confirm connection in the certificate prompt.
That’s it, you’re now successfully connected to your Windows VM!