ssh - run shell script - Error

Hi Team,

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

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

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

 
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.
 

It means what it says. Something hasn't been installed properly, or a file got corrupted.

What is your system?

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.

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

ssh username@host exec /bin/ksh < /path/to/local-script.sh