2

I'm connecting to a windows machine over SSH and would like to launch a GUI app in an existing interactive session.

This should work using psexec -i, but it fails for me in various ways:

  1. psexec -i 1 notepad.exe: notepad crashes without showing UI
  2. 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.
  3. psexec -i 1 <path to vscode>, it launches successfully but then raises a number of errors related to credential storage.
  4. psexec -s -i 1 cmd.exe: this launches fine, but the process is running as nt authority\system, which is not what I want.
  5. 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.

I've seen a ton of questions/answers where it looks like '-i' works for people so I'm not sure what's going wrong here. Any ideas?

1
  • As an aside: passing a session ID to -i is optional, and using just -i defaults to the console session, i.e. in the session of whatever user is physically logged on.
    – mklement0
    Commented Jul 9, 2023 at 17:31

1 Answer 1

1

It could be due to incorrect session id. Can you check if the session id is correct, by navigating to users tab in the task manager

Screenshot of Session ID Screen

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.