The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Administer servers remotely with Web Console iBot UNIX and Linux RSS News 0 05-02-2008 01:20 AM
down load file from unix server to Windows machine. chandu_kalari Linux 3 12-02-2007 10:39 AM
connecting windows remotely from unix using SSH lakshmis10 UNIX for Advanced & Expert Users 1 10-19-2007 01:41 AM
Running UNIX commands remotely in Windows box from Unix box – avoid entering password D.kalpana UNIX for Dummies Questions & Answers 1 04-20-2007 02:24 AM
Explor the Unix server on Windows Client machine ziaullahk IP Networking 2 09-08-2006 05:01 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-09-2006
Registered User
 

Join Date: Jun 2006
Posts: 2
Stumble this Post!
Question how to remotely administer/validate UNIX server via Windows machine?

Hi there--I think this is more of a Windows question, but I think many of you might be able to help me out:

I have a UNIX web server and a Windows machine. I'm trying to script the following tasks so that they can be run from the Windows machine (via a
batch file):

1. Shutdown web services on remote UNIX server.
2. FTP (ie, get) various files/folders from the UNIX server to Windows
client.
3. Startup web services on the UNIX server.

I can accomplish #1 using putty's "plink" command, but I need help
figuring out how to get my Windows script to validate that the "Web
Services shutdown"
completes successfully before it attempts to FTP (ie, get) the UNIX
files.

Also, I'd appreciate any ideas for getting my Windows script to
validate the "Web Services startup" completes successfully.

Please let me know your thoughts.

Thanks in advance!
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 06-10-2006
Registered User
 

Join Date: Jun 2006
Posts: 8
Stumble this Post!
Install cygwin (http://www.cygwin.com/) on the Windows machine and pretend that it is a UNIX box. Assuming you do a fairly complete install once you are running in Cygwin's bash shell, you will feel (mostly) like you are on a Linux box.

If you will be doing a lot interactively, I would highly suggest using Cygwin's rxvt as your terminal rather than Cygwin's default of running bash in a cmd window. Contrary to somewhat popular belief, Cygwin's port of rxvt does not require an X server to be running.
Reply With Quote
  #3 (permalink)  
Old 06-11-2006
System Shock's Avatar
Registered User
 

Join Date: May 2006
Location: Tau Ceti V
Posts: 371
Stumble this Post!
If you do this periodically, to me it looks like a simple cron job in the unix box.
Even If you want to do it on demand, still just make the script in the unix box and execute it from your putty xterm.
Reply With Quote
  #4 (permalink)  
Old 06-19-2006
Registered User
 

Join Date: Nov 2003
Posts: 7
Stumble this Post!
i want to log in to unix from window machine (batch file) and run a script (ksh) on unix


how do i do from plink

plink username@password "server name" scriptname ??


does not work... any help appreciated

or still better i can run the whole script from batch file on windo

say
telnet severname
username
password

ksh
for i in $(cat vidpurge)
do
rm i
done
quit

any help appreciated...
Reply With Quote
  #5 (permalink)  
Old 06-19-2006
Registered User
 

Join Date: Jun 2006
Posts: 2
Stumble this Post!
I think you have the wrong syntax for plink. Here's what I used to connect via ssh:

plink -ssh -pw [password] [username]@[host] [script]
Reply With Quote
  #6 (permalink)  
Old 06-20-2006
Registered User
 

Join Date: Nov 2003
Posts: 7
Stumble this Post!
C:\>plink -ssh -pw [password] [username]@[sername]

give me an error

Unable to open connection:
Host does not exist


I usually do telnet/ftp to the server using sername no problem

do i have to do some setting in putty or i have spaces worng????


new to both putty & unix


thanks for your help
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
linux

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:35 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0