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 <mhall@lgw.com> 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 \\192.168.X.xxx -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:

1) https://github.com/PowerShell/Win32-OpenSSH/issues/996
2) https://github.com/PowerShell/Win32-OpenSSH/issues/998

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.

Cheers,
     R0b0t1

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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