The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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 and shell scripting languages 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 04:20 AM
down load file from unix server to Windows machine. chandu_kalari Linux 3 12-02-2007 02:39 PM
connecting windows remotely from unix using SSH lakshmis10 UNIX for Advanced & Expert Users 1 10-19-2007 04: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 05:24 AM
Explor the Unix server on Windows Client machine ziaullahk IP Networking 2 09-08-2006 08:01 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-09-2006
sohungry73 sohungry73 is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 2
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!
  #2 (permalink)  
Old 06-10-2006
mgerdts mgerdts is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 8
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.
  #3 (permalink)  
Old 06-11-2006
System Shock's Avatar
System Shock System Shock is offline Forum Advisor  
Registered User
  
 

Join Date: May 2006
Location: Tau Ceti V
Posts: 521
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.
  #4 (permalink)  
Old 06-19-2006
sjumma sjumma is offline
Registered User
  
 

Join Date: Nov 2003
Posts: 7
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...
  #5 (permalink)  
Old 06-19-2006
sohungry73 sohungry73 is offline
Registered User
  
 

Join Date: Jun 2006
Posts: 2
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]
  #6 (permalink)  
Old 06-20-2006
sjumma sjumma is offline
Registered User
  
 

Join Date: Nov 2003
Posts: 7
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
Sponsored Links
Closed Thread

Bookmarks

Tags
linux

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 09:42 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0