public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: R0b0t1 <r030t1@gmail.com>
To: cygwin@cygwin.com
Subject: Re: sshd interaction with desktop not working
Date: Sun, 18 Mar 2018 16:19:00 -0000	[thread overview]
Message-ID: <CAAD4mYgiTxOcTgCtk-Be9FWLGWX48LgBtK1Um7CNqh_RJ65n3w@mail.gmail.com> (raw)
In-Reply-To: <1521381141669-0.post@n5.nabble.com>

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

      reply	other threads:[~2018-03-18 15:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09  9:49 Aijaz Baig
2016-02-09 12:56 ` Larry Hall (Cygwin)
2016-02-11  7:00 ` Aijaz Baig
2016-02-11 12:05   ` Andrey Repin
2018-03-16 18:00     ` mhallnh
2018-03-17  6:16       ` Andrey Repin
2018-03-17 20:05         ` mhallnh
2018-03-17 20:21           ` R0b0t1
2018-03-18 15:34             ` mhallnh
2018-03-18 16:19               ` R0b0t1 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAD4mYgiTxOcTgCtk-Be9FWLGWX48LgBtK1Um7CNqh_RJ65n3w@mail.gmail.com \
    --to=r030t1@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).