I got the "Can't connect remotely using Remote-SSH: spawn UNKNOWN" error when I was using VS Code version 1.85.2. After upgrading VS Code to the latest version (1.96.2), the error resolved automatically.