This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sshd interaction with desktop not working

On Sun, Mar 18, 2018 at 8:52 AM, mhallnh <> wrote:
> I guess I'll go back to my original solution which is to use PsExec from
> Sysinternals.
> It's a little more complicated because you have to first run a script to
> retrieve the Windows Session ID
> This script works:
> $username = 'mhall'
> $results = psexec \\192.168.X.XXX query session
> $id = $results | Select-String "$username\s+(\w+)" |
>                  Foreach {$_.Matches[0].Groups[1].Value}
> Then you can follow up by invoking the windows program (notepad in the
> example below).
> the 'i' switch is used to indicate that you want to interact with the
> windows desktop
> psexec \\ -u $username -i $id -d notepad.exe
> pause

If you want to follow along with Microsoft's own effort/inability to
get this feature working in OpenSSH, see:


There is a comment in the latter where I mention SetTokenInformation,
which would allow OpenSSH to duplicate the functionality of PsExec or
parts of the Windows Management Interface.


Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]