Fwd: Remote restart of IIS App pool via ssh
Jeremy Bopp
jeremy@bopp.net
Thu May 6 20:50:00 GMT 2010
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
More information about the Cygwin
mailing list