0

I'd like to write some scripts (run on my linux computer) to help automatically restart some windows services.

While I've found many answers that suggest using net rpc service, they all involve specifying my password on the command line (-U user%password). Doing that isn't very secure, but if I don't, net will prompt for a password on every command, thus breaking the scriptability.

I don't mind if I have to enter my password once, but I have several commands to run against several servers, so can't enter it for every invocation.

I found a --stdin flag, but can't seem to get it to work.

Is there some bash magic or net invocation I can do to do this?

1 Answer 1

0

I have done some work with windows based ssh server. Look like microsoft is starting to support it

https://blogs.msdn.microsoft.com/powershell/2015/10/19/openssh-for-windows-update/

I'm assuming you could use ssh keys for the login which is secure if you protect your keys.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .