X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Message-ID: <4BE32B73.3090403@bopp.net> Date: Thu, 06 May 2010 15:49:55 -0500 From: Jeremy Bopp User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Fwd: Remote restart of IIS App pool via ssh References: In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes 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 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