I'm connecting to a windows machine over ssh and trying to launch a GUI app in an existing interactive session using psexec -i. This fails in various ways depending on the program being run. In all of these cases my logged in user (as reported by whoami) is the same as the user of that interactive session.
psexec -i 1 notepad.exe: notepad crashes without showing UI
psexec -i 1 cmd.exe: I get a black box the size of a cmd.exe window, it never renders. If I look at the window title with "alt-tab", it does say this is an [Administrator] process which is not what I expected.
psexec -i 1 <path to vscode>, it launches successfully but then raises a number of errors related to credential storage.
psexec -s -i 1 cmd.exe: this launches fine, but the process is running as nt authority\system, which is not what I want.
psexec -i 1 -u my_user -p my_pwd <path to vscode>: this works fine, but I can't require passwords and want to use ssh key-based auth instead.
Any ideas what I'm doing wrong, or better ways to accomplish this?