X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; q=dns; s=default; b=Yr+LJnE XXB7Mzfusfgfwgu/QqewnszEjYuFzYMgz0hcSAHdbtrvKIDJSUXvQSgVjLJYZg5W MKoPHEVDddUP5FqkdTcZhofedfTwrsAQJ4DzZZMl3IiYVmNUsqy4HkuHT4X6dfrx IQcdZOP+oCE1KDsGBIcmWoZVVK9DMi073jlI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type; s=default; bh=0w/lOcrSai1Sf kNa/UKH74nkPLI=; b=siP8hS6osqyDZ0qSXphSqzyABTG+R0FZPeYdDFxmxeXnq 0cwn0z057IOb22VUTR9UlRtQnyRHd0Y4x8+VbV5Ij+ridyTIFiU9Z7gJFOfkHhbm 3jNRzC/qm73LF1Cp1ooki+Ww9JvHWJTOyb3kjRPMecz054SBUMI6N50+extY0k= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=username, HX-Received:sk:w18-v6m, 996, Management X-HELO: mail-lf0-f44.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=1roM0hDIX8zlECtJjvpqOgT9zXChzxND9Vz4mG3AFMs=; b=WFah67Dc/NZxWO9hJZWxgiJbygrDg/xBMl2ez/uvz2GCsNcRrZmz+tZL/tXWlF9PGP qDaS3HEeoNIQj8kz/hzWVmnhvHla/sdUJSYmooe7nfVRvqfWf0yDlMDPKLtLTfRsT+yz bmM9vDEtg6Edx+T9fv5gLzAsY2GKv9EG9EGI0idKyyDvZO6KQK1d8qayejghiryMLaYZ KUV/hzy5k6cYRwZIminCKcKaQXMMVnwIaJUYjXdapGHfyzin5zHyM/0CkQg+vsKV4K81 4bBS4/KC8mD5LNd9fueQGkRKNWM9Tux6wXz7nRWdOLNvW741oZjzWs31pMybMWip+vwZ yiqw== X-Gm-Message-State: AElRT7H+2d9gmU2K83unxiWWSoj8a6pG+9QKTdufuLxsGwWBwZ4ST4CS GPyW8HvQDoay9dtz0l0vHD6il3WH8hJUBavLLLG5Yg== X-Google-Smtp-Source: AG47ELtRilg0mOJro50zBPqjN0yjIwafFTY/bmmpuIF8skR5ct4TOhJKfqeekL/nrZ8EP7X1M65foY735Q/57819Vx8= X-Received: by 2002:a19:7b12:: with SMTP id w18-v6mr6064876lfc.104.1521387896819; Sun, 18 Mar 2018 08:44:56 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1521381141669-0.post@n5.nabble.com> References: <1769495026 DOT 20160211145642 AT yandex DOT ru> <1521222444047-0 DOT post AT n5 DOT nabble DOT com> <386991849 DOT 20180317054151 AT yandex DOT ru> <1521316059812-0 DOT post AT n5 DOT nabble DOT com> <1521381141669-0 DOT post AT n5 DOT nabble DOT com> From: R0b0t1 Date: Sun, 18 Mar 2018 10:44:56 -0500 Message-ID: Subject: Re: sshd interaction with desktop not working To: cygwin AT cygwin DOT com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes 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 \\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