ssh - run shell script - Error


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ssh - run shell script - Error
# 1  
Old 06-01-2011
ssh - run shell script - Error

Hi Team,

I am trying to run shell script from one server to another server with below command.

Code:
 
ssh abc@pqr.america.com /tmp/test.ksh

But, it gives below error. Can someone help me what is the issue?

Code:
 
exec(): 0509-036 Cannot load program ssh because of the following errors:
        0509-150   Dependent module <path>/bin/libcrypto.a(libcrypto.so.0.9.8) could not be loaded.
        0509-153   File /<path>/bin/libcrypto.a is not an archive or
                   the file could not be read properly.
        0509-026 System error: Cannot run a file that does not have a valid format.

# 2  
Old 06-01-2011
It means what it says. Something hasn't been installed properly, or a file got corrupted.

What is your system?
# 3  
Old 06-01-2011
IBM-AIX is the system.

Can someone tell me what is the issue, as i have to ask Admin team at client side on what actually a problem is.

Also, how to setup ssh between 2 servers?

---------- Post updated at 10:25 PM ---------- Previous update was at 09:49 PM ----------

ok guyes, the problem solved. The error mentioned above is gone..

There is one more issue.

in my shell script in remote server/target server, i have given below code.

#!/bin/ksh

echo "Hey, this is working" >> /tmp/log.log

and i am executing below command.

ssh abc@pqr.america.com /tmp/test.ksh

This command is not giving any error, but at the same time, this command should execute test.ksh script in pqr.america.com server and generate log.log file. I think, still there are some issue. i have also changed the permission of the file to chmod 777 test.ksh.
# 4  
Old 06-01-2011
777 is not the magic sledgehammer to fix all permissions problems. These values mean things and may have much farther implications than you wanted. Do you really want this file to be world-writable? How about 700, or 750.

What happens when you do an interactive login to that server and run /tmp/test.ksh ? or ls -l /tmp/test.ksh for that matter?

Does /tmp/log.log exist already? Does your user have permissions to write to it?

What kind of server is the remote server? Might it not have ksh?

Do you really need to create a temporary script file, anyway? That's a potential security hole and usually there's no need for that, you can execute local scripts on a remote server by doing
Code:
ssh username@host exec /bin/ksh < /path/to/local-script.sh


Last edited by Corona688; 06-01-2011 at 02:05 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script run in a case statement call to run a php file, also Perl

Linux System having all Perl, Python, PHP (and Ruby) installed From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file eg eg a Shell script run in a case statement call to run a php file, also Perl or/and Python file??? Like #!/usr/bin/bash .... .... case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies

2. Shell Programming and Scripting

Run cron on ssh, error message

how to run the script below * * * * * /usr/bin/wget -O - -q "http://example.com/scheduler/cron" when i run the script, the error message show as below: $ * * * * * /usr/bin/wget -O - -q "http://website.com/?q=admin/settings/scheduler/cron" -sh: CHANGELOG.txt: not found $ 30 15 * * *... (11 Replies)
Discussion started by: dolbyater
11 Replies

3. UNIX for Dummies Questions & Answers

how to use ssh to run shell script on a remote machine?

how to use ssh to run shell script on a remote machine? ssh user@remote sh ./script.unx i ran the above command ./script.unx HAS NOHUP COMMAND IN ITS BODY, I AM GETTING ERROR AS NOHUP NOT FOUND... i tried to run that script from remote server, its working fine do ineed to set... (6 Replies)
Discussion started by: only4satish
6 Replies

4. Shell Programming and Scripting

run query in shell script after ssh

Hi, I need to run sql query in shell script after getting connected to ssh. For that I connected to ssh through shell script using RSA keys done]. Now when I am running sql query, it's not working... but several other commands like 'ls'. 'mkdir', etc are working properly. Here is my code: ... (2 Replies)
Discussion started by: shekhar2010us
2 Replies

5. Shell Programming and Scripting

ssh run script error

Hello when try to excute the following ssh -l pla 10.287.60.55 vis_fil vis_fil not found. but it works fine when login to the server. can you help me run this command in one online because i will add later to shell script regards (1 Reply)
Discussion started by: mogabr
1 Replies

6. Shell Programming and Scripting

shell script to run after ssh logout from another machine

Scenario: I currently manager a cluster at work which is on a private network and i constantly need to ssh to other clients for diags e.t.c. I created a debain client which i use as my gateway to get to all the clients on the private network and I then created a Shell menu script which will make... (4 Replies)
Discussion started by: defamer
4 Replies

7. Solaris

Shell Script gives error when run through cron job.

Hi, The following shell script runs without any problem when executed manulally. USED=$(df -h /arch | tail -1 | awk '{print $5}' | cut -d '%' -f 1) if then find /arch/AUBUAT/ -type f -mtime +0 | xargs rm find /arch/AUBMIG/ -type f -mtime +0 | xargs rm fi But the same gives below... (6 Replies)
Discussion started by: ksadiq79
6 Replies

8. Shell Programming and Scripting

Run shell script on another server using ssh

Hi, I have 2 servers and i installed ssh2 on both boxes .. so they they can communicate with each other with our password auth .. now i want to write a scrip on box 1 for running commands and getting out put from the second box can some one help me out Thank you in advance (1 Reply)
Discussion started by: anwesh
1 Replies

9. Shell Programming and Scripting

found error 138 while run shell script

I found error 138 while run a shell script. Please tell me what it's mean?? and how can i prevent that error. Thanks in advance..... (1 Reply)
Discussion started by: rinku
1 Replies

10. Shell Programming and Scripting

Shell script run error ksh: not found

Hi All, I am trying to run a script to FTP files from one UNIX server to another UNIX server. Actually I can able to FTP file successfully by manually or paste whole script at prompt. But when I am trying to run script it is giving error. Please let me know the cause. #!/bin/sh... (3 Replies)
Discussion started by: nz80qy
3 Replies
Login or Register to Ask a Question