Computing.Net > Forums > Programming > ssh to call script on unix

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

ssh to call script on unix

Reply to Message Icon

Name: hardik0907
Date: June 16, 2009 at 05:25:53 Pacific
OS: UNIX AIX
Subcategory: Opinions
Comment:

Hi All ,

I need to call a script X on server A from server B using ssh
script X inturn calls another script Y on server A itself.

My problem is that it says that script Y is not found.

My ssh setup is proper.
I m using following command
ssh user@A sh X

please help me on this.



Sponsored Link
Ads by Google

Response Number 1
Name: David Perry
Date: June 16, 2009 at 12:36:23 Pacific
Reply:

rather than call it is a

"sh scriptname"

make sure the script has the appropriate shell declaration line then call it as

"/full/path/to/scriptname"

ssh user@host /full/path/to/scriptname


0

Response Number 2
Name: hardik0907
Date: June 16, 2009 at 23:43:17 Pacific
Reply:

Thanks Buddy.
Also if i call inner Script Y by its full path in script X it works.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: ssh to call script on unix

batch file to call reg files? www.computing.net/answers/programming/batch-file-to-call-reg-files/8298.html

need help - compile C DLL on UNIX www.computing.net/answers/programming/need-help-compile-c-dll-on-unix/6273.html

pthyon on unix www.computing.net/answers/programming/pthyon-on-unix-/3700.html