Oh ! That sounds interesting.

You might want to write your own ssh server using twisted for windows
server that processes some commands you define and translates them to some
powershell calls parses them and sends them back to your flask app which
would be acting as an ssh client.

A start would be here:
https://twistedmatrix.com/documents/current/_downloads/sshsimpleserver.py

>From the process running on the windows server, wait for connections,
establish the connection, parse the incoming commands you define, and
generate powershell commands, then  execute powershell commands from python
and send the parsed result back to your calling process.

https://stackoverflow.com/questions/14508809/run-powershell-function-from-python-script
.

Maybe there are oppinions on security of this relative to winRM
I think maybe winRM uses kerberos for auth?

On Tue, Dec 2, 2014 at 1:06 PM, Matt Shields <m...@mattshields.org> wrote:

> I'm sure SaltStack is great for config management and remove control, but
> we have a custom internal dashboard where they would like to see the status
> of each of the servers Windows service and be abel to start/stop them from
> this dashboard.  It's a Flask/python app which runs on a linux box.
>
> Matt
>
> On Tue, Dec 2, 2014 at 10:57 AM, John Hall <johnhall...@gmail.com> wrote:
>
>>
>> Have you considered using SaltStack?
>> http://docs.saltstack.com/en/latest/topics/index.html#
>>
>> On Tue, Dec 2, 2014 at 8:01 AM, Matt Shields <m...@mattshields.org>
>> wrote:
>>
>>> Yes, run the python app on Linux but connect to a Windows server and
>>> query/start/stop a service.
>>>
>>> Matt
>>>
>>> On Mon, Dec 1, 2014 at 5:24 PM, Edward Ned Harvey (blu) <
>>> b...@nedharvey.com>
>>> wrote:
>>>
>>> > > From: discuss-bounces+blu=nedharvey....@blu.org [mailto:discuss-
>>> > > bounces+blu=nedharvey....@blu.org] On Behalf Of Matt Shields
>>> > >
>>> > > Anyone know of a python module that will let me query/start/stop a
>>> > > Windows
>>> > > service?  The module needs to be able work on a Linux system.  I've
>>> > looked
>>> > > around but it seems all the modules I find require the python app to
>>> run
>>> > on
>>> > > a Windows machine.
>>> >
>>> > You mean you want to run something on linux, which will somehow reach
>>> out
>>> > to a windows machine and start/stop windows services remotely, right?
>>> >
>>> > You're looking for a linux equivalent of these?
>>> >         sc \\machine stop <service>
>>> > or
>>> >         psexec \\machine net stop <service>
>>> > etc
>>> >
>>> _______________________________________________
>>> Discuss mailing list
>>> Discuss@blu.org
>>> http://lists.blu.org/mailman/listinfo/discuss
>>>
>>
>>
>
_______________________________________________
Discuss mailing list
Discuss@blu.org
http://lists.blu.org/mailman/listinfo/discuss

Reply via email to