Problem with running the remote script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Problem with running the remote script
# 1  
Old 05-28-2009
Problem with running the remote script

Hi All,

I am running a script which is present on remote machine using ssh command.

the remote script is failing when try to load a property file. It says file does not exist.

Any idea what should be the problem for this.

Thanks
Supriya.
# 2  
Old 05-28-2009
Can you post sample code of what you are trying to do and what does the properties file contain.

ssh username@server /home/user/scripts/script.sh
# 3  
Old 05-28-2009
Hi,


Host Script
#! /bin/ksh
. install.properties
ssh -q "$target_user"@"$target_machine" "$target_install_script"


remote script ---
#! /bin/ksh
#Tibco Properties file is inclusion
. TibcoInstall.properties
.....
# 4  
Old 05-28-2009
Try this for properties file.

source absolutepath/filename
# 5  
Old 05-28-2009
My SSH command is successful as it asks for password .. but it get failed at property file inclusion step...

when i run the same script from the target machine it works fine. But when i call it remotely.it is failing.

Thanks
Supriya

-----Post Update-----

Any help or suggestions for this

Thanks
Supriya

-----Post Update-----

any help????????

-----Post Update-----

any help????????
# 6  
Old 05-28-2009
What SHELL is it on the remote host.

The properties file seem to have a dot(.) in between. Can you escape that in see?
# 7  
Old 05-29-2009
This is the way how we should include a property file, a dot and space and property file will make that file to be included in the shell script.

When i run the shell script in the server itself. It works fine. When i try to run using ssh command from a different server it says file not found at the property file inclusion line
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Running a remote script with automatic options

I'm trying to run a script that will remotely copy another script to remote host and run copied script to remote server with automatic options- #! /bin/bash HOSTNAME="1 2" for HOST in $HOSTNAME; do scp diskFrag.sh login@$HOST:/home/login sleep 30 ssh login@$HOST... (2 Replies)
Discussion started by: Mannu2525
2 Replies

2. Shell Programming and Scripting

Running script on remote server

Hi All, I need to run a ksh script on around 200 servers(consisting of AIX,LInux,HP-UX,Solaris). The script is there in the /tmp directory of all the servers. I want want to execute the script in background on the respective servers and then exit from there. I have written something like below:... (8 Replies)
Discussion started by: proactiveaditya
8 Replies

3. Shell Programming and Scripting

Running a script on multiple remote hosts at once

I have a script on about 15 hosts that I need to run for each host whenever I want (not crontab). Problem is, this script takes 5-10 mins to run for each host. Is there a way I can run the script in parallel for all the hosts instead of 1 at a time? Also, I'm remotely running the script on the... (3 Replies)
Discussion started by: mrskittles99
3 Replies

4. UNIX for Dummies Questions & Answers

Display problem when running a remote script

Hi, Quick question, someone will hopefully be able to stop me from :wall:. I currently have a script which calls a script on a remote machine and captures the stdout to a file: ssh <user>@<server> > output 2>/dev/null <<_EOF /path/script.ksh _EOF This runs the script but the... (4 Replies)
Discussion started by: chris01010
4 Replies

5. UNIX for Advanced & Expert Users

Script running on remote machine - How ??

Hi All, This was an interview question " There is a clean-up shell-script in one UNIX machine and it is connected to 100 other UNIX machines. Howe can we run the script on all the 100 machines without ftping/copying the script to target machines ? I was unable to answer, please answer if... (5 Replies)
Discussion started by: coolbhai
5 Replies

6. Shell Programming and Scripting

Problem running ssh from remote server

So I have a script which performs some basic commands on another server via ssh. It works great, no issues at all. Let's call this "Script A" BUT, this working script is to be executed remotely from a different UNIX script on another server, also by ssh. Let's call this "Script B". When... (1 Reply)
Discussion started by: newerakb
1 Replies

7. Shell Programming and Scripting

How to stop a script running in remote server from local script

Hi, I have googled for quite some time and couldn't able to get what exactly I am looking for.. My query is "how to stop a shell script which is running inside a remote server, using a script"??? can any one give some suggestions to sort this out. (1 Reply)
Discussion started by: mannepalli
1 Replies

8. UNIX for Advanced & Expert Users

Running script on remote machine

if i have a script in my system which i need to run on remote system using ssh, how shall i do it? One easy way to to first scp it to remote machine and then run it on remote machine using ssh. Is there any one step way to do it. Preferably one in which i should give password only once (3 Replies)
Discussion started by: vickylife
3 Replies

9. Shell Programming and Scripting

Running a Script in a Remote server

I am trying to write a script that would let me run a command in a remote server using ssh. scriptA: (dcm2nii is a command that only works on the other server) dcm2nii a b c scriptB: (I run this one on the current server) ssh -X otherserver /home/abc/Desktop/scriptA But when I do ... (2 Replies)
Discussion started by: ZeroGPX
2 Replies

10. Shell Programming and Scripting

running a script on remote server.

I need to run a script on a remote server from my ksh script. The issue I'm having is that I need to logon to the remote server as a different user. (see the following) logged on to server 1 as adsmgr neet to log on to server 2 as odemgr run passwd_util.ksh Thanks in advance. (1 Reply)
Discussion started by: whited05
1 Replies
Login or Register to Ask a Question