One-click SSH Tunnel with RDP from Linux to a remote Windows PC

Related: Windows to Windows SSH / RDP

Assumes Linux laptop to connect to a remote PC such as: * Windows PC with SSH server * Linux PC with XRDP


apt install freerdp2-x11

If this has connection issues, you can fall back to using freerdp-x11.


Remote PC IPRemote PC SSH portRemote PC RDP port (open TCP firewall)3389 (blocked by remote PC firewall)
  1. create script on your laptop:

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

   xfreerdp /v:localhost:4389
  1. make executable
   chmod +x
  1. Setup SSH tunnel and connect to the RDP Windows desktop from Linux laptop:


  • Advanced freerdp configuration (e.g. limited bandwidth)
  • xfreerdp command line options
  • Try freerdp-x11 if freerdp2-x11 errors upon first mouse click after connecting with:
  [ERROR][com.freerdp.core] - freerdp_check_fds() failed - 0
  [INFO][com.freerdp.client.x11] - Network disconnect!
  [ERROR][com.freerdp.client.x11] - Failed to check FreeRDP file descriptor
  [ERROR][com.freerdp.channels.cliprdr.client] - cliprdr_order_recv failed with error 1359!
  [ERROR][com.freerdp.core] - cliprdr_virtual_channel_client_thread reported an error. Error was 1359
  • freerdp2-wayland on Wayland didn’t work for me.