Calling script located at server-B from server A


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Calling script located at server-B from server A
# 1  
Old 11-11-2012
Calling script located at server-B from server A

i am using HP-UX, i am writing a shell script to call a script located at server-B from server A.

i am able to ping Server-B from Server-A (working ), what all the environment varaibles i need to set to call a script located at server-B from server A.

---------
Code:
 
#!/bin/sh
timestamp=$(date +%Y%m%d%H%M%S)
echo " from server A , calling the script in server B"
ssh -q username@ipaddressofserverB   /ESM/ESM_scripts/serverB.ksh" > v2_${timestamp}_log  2>&1
#other commands 
exit 0

above code is not working
# 2  
Old 11-11-2012
Missing double quote:-
Code:
 ssh -q username@ipaddressofserverB "/ESM/ESM_scripts/server.ksh"

# 3  
Old 11-11-2012
i tried like below, but not displaying anything on terminal......not throwing any error as well

Code:
 
ssh -q username@ipaddressofserverB "/ESM/ESM_scripts/server.ksh"

# 4  
Old 11-11-2012
Remove -q option and re-try.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to Append the output of a script running in remote server to a file in local server?

Hi guys, So i am in server1 and i have to login to server 2, 3,4 and run some script there(logging script) and output its result. What i am doing is running the script in server2 and outputting it to a file in server 2 and then Scp'ing the file to server1. Similarly i am doing this for other... (5 Replies)
Discussion started by: srkmish
5 Replies

2. UNIX for Dummies Questions & Answers

Transfer file from server B to server C and running the script on server A

I have 3 servers A, B, C and server B is having some files in /u01/soa/ directory, these files i want to copy to server C, and i want to run the script from server A. Script(Server A) --> Files at Server B (Source server) --> Copy the files to Server C(Target Server). We dont have RSA key... (4 Replies)
Discussion started by: kiran_j
4 Replies

3. Shell Programming and Scripting

calling a shell script from another server

hi All, There is a requirement where i need to call a script which is on another server(say server2). Any pointers on how i can achieve this? I tried the command ssh **ipaddress** /home/mqm/jay.sh but its not working...after typing in the command the cursor goes to the next line thats... (7 Replies)
Discussion started by: jayii
7 Replies

4. Shell Programming and Scripting

calling a shell script present on another server using perl script.

Hi, I am working on a sever A. I want to write a perl script to execute a shell script persent on the server B. please help me in this. thanks in advance. (3 Replies)
Discussion started by: anandgodse
3 Replies

5. Shell Programming and Scripting

Problem in appending text to a file located in remote server

ssh -q "server_name sudo echo 'dbagroup::1234' >> sudo /etc/group"if i execute the above code its not getting appended. my requirement is to login to remote server and append dbagroup::1234 in /etc/group i am able to achieve this with tee -a command want to know why its not working with >>... (5 Replies)
Discussion started by: chidori
5 Replies

6. Programming

Problem with Perl script after moving from a Windows/Apache Server to a UNIX server.

I have a Perl script that worked fine before moving it to justhost.com. It was on a Windows/Apache server. Just host is using UNIX. Other Perl scripts on other sites that were also moved work fine so I know Perl is functioning. The script is called cwrmail.pl and is located in my cgi-bin. When I... (9 Replies)
Discussion started by: BigBobbyB
9 Replies

7. UNIX for Dummies Questions & Answers

How do install binary located on another server

Hi, For an automated install, an install script runs locally on the machine being installed on. This "install script" has to install programs that are located on the install server. How can I script this?I (1 Reply)
Discussion started by: mojoman
1 Replies

8. Shell Programming and Scripting

calling a script in remote server

Hi, I need to call a shell script present in the remote server from the shell sript in my server. Can any one help to do this ASAP... Thanks (1 Reply)
Discussion started by: Preet
1 Replies

9. Shell Programming and Scripting

Deleting a file located on another server

Hi, I have successfully copied a file from one server to another using following command. user1@server1# scp test.jsp user2@server2:/home/ Now i want to delete that copied file(test.jsp) from "server2" by running some command from server1. Please help... (2 Replies)
Discussion started by: SanketJOSHI
2 Replies

10. UNIX for Dummies Questions & Answers

Deleting a file located on another server

Hi, I have successfully copied a file from one server to another using following command. user1@server1# scp test.jsp user2@server2:/home/ Now i want to delete that copied file(test.jsp) from "server2" by running some command from server1. Please help... (1 Reply)
Discussion started by: SanketJOSHI
1 Replies
Login or Register to Ask a Question