Automate remote script

Hi all,

I need to execute a script on a remote machine that are connected to the network.The basic requirement is to write a script which will login in remote machine and then execute the other script automatically placed in remote machine.So that I need to execute the remote machine script manually.

Is there anyway I can force immediate execution of a script in order to do this?

Thanks in advance.

You need to use client server programs for this problem.

What you basically want is

  1. Copy a script to a different machine using scp
  2. Connect to the remote machine and run the script using ssh

Both can be completely automated using public key authentication, which has been discussed, described, and debugged numerous times on this site. Please use the search feature for more details.

Thanks for reply..
I had written two scripts and then trying to execute it remotely from windows.Now the problem is that one script is working fine and when I am using the same script with some other modification,I am unable to connect and execute it-

giving the following error--

I am executing it from same system..
Any suggestions would be appreciated....