This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Fwd: Remote restart of IIS App pool via ssh
- From: Jeremy Bopp <jeremy at bopp dot net>
- To: cygwin at cygwin dot com
- Date: Thu, 06 May 2010 15:49:55 -0500
- Subject: Re: Fwd: Remote restart of IIS App pool via ssh
- References: <g2v8d4f2741005061304x1ed44d57i8b67f615e7ab9ead@mail.gmail.com> <m2z8d4f2741005061311qbd965147g39d2b8ec6425459f@mail.gmail.com>
On 5/6/2010 3:11 PM, Jason Hamilton wrote:
> Ok so this is what I am trying to do.
> Server 1 has cygwin installed and I can ssh into it using keys
> My batch file on the server is working just fine for what I want it to do
> Here is the problem. I have a vbs script that needs to be ran at the
> beginning and the end of the shell script to stop and start a remote
> app pool.
> Here is my script
>
> All this does is stops the app pool on the second server, copies the
> files over and then starts it back up. Nothing special
>
> #! /bin/bash
>
> cmd.exe /c E:\stopapppoolenv1.vbs
>
> xcopy /y /s /i "E:\WEBSITES\bpmportalenv1\webroot\*.*"
> "\\bidcbpm2002.corp.global.level3.com\bpmportalenv1$"
>
> cmd.exe /c E:\startapppoolenv1.vbs
>
> exit 0
>
> So when I run it, it copies the files to the remote server just fine
> but when it gets to the section about stopping and starting the app
> pool on the remote server I get this
>
> $ cmd.exe /c stopapppoolenv1.vbs
> e:\stopapppoolenv1.vbs(2, 1) Microsoft VBScript runtime error:
> Permission denied: 'GetObject'
>
> when I log into the box as the user that I am ssh’d in as I can run
> the vbs files just fine the user is a local admin on both boxes.
My guess is that you have not followed method 3 for accessing the system
remotely without a password:
http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd3
Basically, you need to somehow have your domain password available so
that a full token can be created which allows for network access and
authentication. The only marginally secure way to do that with pubkey
authentication under ssh is to use method 3.
-Jeremy
--
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