Automate remote script

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Automate remote script
# 1  
Old 12-14-2010
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.
# 2  
Old 12-14-2010
You need to use client server programs for this problem.
# 3  
Old 12-14-2010
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.
# 4  
Old 12-21-2010
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-

C:\Demo\test>c:\Demo\putty.exe root@IP of Machine on which I want to execute the script remotely -pw xxxxx -m c:\Demo\test\
giving the following error--
Putty Fatal error: server unexpectedly closed network connection.
I am executing it from same system..
Any suggestions would be appreciated....
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Automate DIRECTORY ENTRY when in remote SHELL

Good day all I am trying to figure out how to automate the command in a shell script that i have written. Some context: The script does the following on the local host #!/bin/sh banner 'QikCopy' echo "Please insert file name for SCP command!" read file DUMMY scp -p $file... (2 Replies)
Discussion started by: MrRobot
2 Replies

2. Shell Programming and Scripting

SFTP script to automate login in to remote server

Greetings, guys. I'm not much of a programmer forgive me for being a noob, because of someone leaving, I was put in an IT spot where I have to figure out a few things. Being new to Linux and programming has been a challenge. My boss has asked me to create an automated script to connect to a 3rd... (7 Replies)
Discussion started by: giovannym
7 Replies

3. Shell Programming and Scripting

How to automate SSH remote connection with a shell script

Hi Guys! I am trying to write a shell script for automated ssh. vairable user and passwd have initialized correctly, but when I use the following it still prompting me for the password. #!/usr/bin/bash user='root@' passwd='admin' ssh $user $passwd uptime exit I... (3 Replies)
Discussion started by: pinpe
3 Replies

4. Windows & DOS: Issues & Discussions

automate the script

Dear all, I I want to login to my Linux machine using putty and then run some script from Windows machine.we can do it after loging it and then execute the script by typing it in putty command line screen. but I want to automate it.So whenever I will fire this script,it will do the following... (4 Replies)
Discussion started by: smartgupta
4 Replies

5. Shell Programming and Scripting

mail script to automate

Hi, Here below the logs from the mail server: less /var/log/messages: Sep 6 04:03:31 server-59 out: 1252227811|||2175|success|1 Sep 6 04:03:33 server-59 in: 1252227813|||30376|success|1 Sep 6 04:03:35 server-59... (8 Replies)
Discussion started by: gsiva
8 Replies

6. Shell Programming and Scripting

How can I automate a script?

Hi All, Can I automate a script when some one trying to 'vi' (open) a file. For Example, I am having a file named ''. when a user types " vi " in unix command prompt a script named needs to be automated. Can this be possible. if Yes please guide... (2 Replies)
Discussion started by: little_wonder
2 Replies

7. Shell Programming and Scripting

Automate Script ***V. Urgent

Hi All, ./procdure.ksh which opens the below the menu, I want to build a script which will press 4 and run the Sector Data Automatically (instead of pressing option 4 manually) Is there any way for this, please let me know... 1) FX Rates MDU 9) Fidessa Cash... (7 Replies)
Discussion started by: niceboykunal123
7 Replies

8. UNIX for Advanced & Expert Users

Shell Script to Automate

I would like to automate script where i do not have to manually insert the username and password I wrote two different scripts but not able to achieve the results: here's to scripts i wrote #!/bin/bash cd /var/tmp /home/server/steve/pca --askauth -idx /opt/app/bin/expect <<EOF expect... (1 Reply)
Discussion started by: sam786
1 Replies

9. Shell Programming and Scripting

here document to automate perl script that call script

I am trying to use a here document to automate testing a perl script however when the perl script hits a system(perl call, input is no longer entered into this subscript. here is my script $ cat #ksh for testcase do program <<-EOF | tee -a funcscnlog.log y... (3 Replies)
Discussion started by: hogger84
3 Replies

10. UNIX for Dummies Questions & Answers

automate the input in a script

I have a program that i have to run by cron. The program needs user input. So i have to automate that in a littke script. start of script result=program.log; export result echo Program starting : `date` >> $result /usr/local/program >> $result echo Program running : `date` >>... (11 Replies)
Discussion started by: erwinspeybroeck
11 Replies
Login or Register to Ask a Question

Featured Tech Videos