3 servers 1 .ksh script


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers 3 servers 1 .ksh script
# 1  
Old 01-18-2008
3 servers 1 .ksh script

system = AIX

How can I explain this.....

Keep in mind I do not want to login to the boxes, persay, and that I am fairly new to scripting and unix.

I want to use SSH.

I have a script on server1, this is where I want it to run from.
I have server2 and server3, where I want the script to get information from.

basically I want to be able to run a grep command from server1 to server2 and server3.

That is just about it, I can't think of any other way to put it.

Any help is greatly appreciated, thank you in advance.

-cml2008

Last edited by cml2008; 01-18-2008 at 05:02 PM.. Reason: might have left out pertinent information
# 2  
Old 01-18-2008
See the man page for ssh. You can, if you set up ssh correctly, run a ssh to hostname with optional command.

Quote:
DESCRIPTION

ssh (SSH client) is a program for logging into a remote machine and for
executing commands on a remote machine. It is intended to replace rlogin
and rsh, and provide secure encrypted communications between two
untrusted hosts over an insecure network. X11 connections and arbitrary
TCP/IP ports can also be forwarded over the secure channel.

ssh connects and logs into the specified hostname (with optional user
name). The user must prove his/her identity to the remote machine using
one of several methods depending on the protocol version used.

If command is specified, command is executed on the remote host instead
of a login shell.
unixhelp.ed.ac.uk man ssh
# 3  
Old 01-20-2008
Thanks RTM, I did not even think about seeing if there were man pages for ssh.

I appreciate the help.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Call one script from other script lying on different servers.

HI All, I have a requirement of execueting a Shell script on serverA, which is going to execute an application script ( Hyperian Planning script ) on serverB. Can any one please help in how to achieve this? e.g. script abc.ksh runs on serverA. internally abc.ksh call a script... (3 Replies)
Discussion started by: alok2082
3 Replies

2. UNIX for Dummies Questions & Answers

ksh to check second time difference between two servers

I am currently setting up a public key authentication between servers. The goal is to get the date via `ssh hostname date` on all the 4 remote servers , put the value in a text file on the central server and compare the date (specifically seconds) for each server date output to check if time is... (7 Replies)
Discussion started by: depam
7 Replies

3. Shell Programming and Scripting

Need bash script to ping the servers and rename the output file each time the script is ran

HI, I have a file serverlist in that all host names are placed. i have written a small script #./testping #! /bin/bash for i in `cat serverlist` do ping $i >> output.txt done so now it creates a file output.txt till here fine.. now each time i run this script the output file... (4 Replies)
Discussion started by: madhudeva
4 Replies

4. Shell Programming and Scripting

Same KSH behaving differently on diff servers

HI all I have written a ksh to execute PL/sql procedure and generate the log file. The script is working fine to the extent of calling the taking input, executing PL/SQL procedure. On one server the log file is getting generated properly. i,e it shows the DBMS output . The log file size was... (9 Replies)
Discussion started by: ramakrishnakini
9 Replies

5. Shell Programming and Scripting

ksh connection to other servers

Hello, I am looking for a way for a server to launch a connection command to one of the other servers where the connection command has already embedded in it a server name, user name and a password. (2 Replies)
Discussion started by: LiorAmitai
2 Replies

6. Shell Programming and Scripting

KSH script to run other ksh scripts and output it to a file and/or email

Hi I am new to this Scripting process and would like to know How can i write a ksh script that will call other ksh scripts and write the output to a file and/or email. For example ------- Script ABC ------- a.ksh b.ksh c.ksh I need to call all three scripts execute them and... (2 Replies)
Discussion started by: pacifican
2 Replies

7. Shell Programming and Scripting

import var and function from ksh script to another ksh script

Ih all, i have multiples ksh scripts for crontab's unix jobs they all have same variables declarations and some similar functions i would have a only single script file to declare my variables, like: var1= "aaa" var2= "bbb" var3= "ccc" ... function ab { ...} function bc { ... }... (2 Replies)
Discussion started by: wolfhurt
2 Replies

8. Shell Programming and Scripting

ksh to run servers

I want to write a Kshell program which will start the servers(Oracle,DataIntegrator). Can anybody help me with this? I would appreciate your help. Thanks in advance (0 Replies)
Discussion started by: pari111222
0 Replies

9. Shell Programming and Scripting

tracing a ksh script within a ksh script

I normally trace a script with the ksh -x <script name> and redirect strderr to file. But if you have a script like the examble below...... vi hairy bear=`grep bear animals` if then ksh more_animals fi If I ksh -x hairy it won't trace "more_animals" unless I put a -x in it. Is... (1 Reply)
Discussion started by: shorty
1 Replies

10. Shell Programming and Scripting

executing a ksh script from another ksh script

Hi, I'm new to unix scripting.How can i call a script from another script. I have a.ksh and b.ksh .I have to call b.ksh from a.ksh after it is successfully exceuted. I tried using #!/bin/ksh -x in a.ksh and at the end i have used /path/b.ksh My problem is it is executing only a.ksh.it... (6 Replies)
Discussion started by: ammu
6 Replies
Login or Register to Ask a Question