One-click RDP + SSH Linux to remote Windows PC

Assumes Linux laptop to connect to a remote PC such as:

On the Linux laptop:

apt install freerdp2-x11
Remote PC IP Remote PC SSH port Remote PC RDP port
1.2.3.4 22 (open TCP firewall) 3389 (blocked by remote PC firewall)

Create executable script myrdp.sh on the Linux laptop:

#!/bin/sh

ssh -f -L 4389:localhost:3389 remoteusername@1.2.3.4 sleep 1;

xfreerdp /v:localhost:4389

Running that script on the Linux laptop connects using RDP over SSH to the Windows computer

Notes

  • Advanced freerdp configuration (e.g. limited bandwidth)
  • xfreerdp command line options
  • If freerdp2-wayland on Wayland doesn’t work, try freerdp2-x11.

Related: Windows to Windows SSH / RDP