run remote perl script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting run remote perl script
# 1  
Old 08-24-2011
run remote perl script

Hello

i want create perl script to connect remotely to another machine and run perl script

please note that the remote script check for different variables remotely and not located on local machine

also i want to know how to send interactive variables

i am trying to make script to connect remotely and execute other perl script then save the output in local file

any help will be appreciated

thanks

Last edited by mogabr; 08-25-2011 at 06:21 AM..
# 2  
Old 08-24-2011
Quote:
Originally Posted by mogabr
how to run remote perl script from local linux machine ?
Code:
ssh remote_server /path/to/perl/script/foo.pl

Quote:
Originally Posted by mogabr
want to know how to send interactive variables
Code:
ssh remote_server /path/to/perl/script/foo.pl $argument1 $argument2 ...

Quote:
Originally Posted by mogabr
i am trying to make script to connect remotely and execute other perl script then save the output in local files
Code:
ssh remote_server /path/to/perl/script/foo.pl $argument1 $argument2 ... >output.log

# 3  
Old 08-25-2011
Quote:
Originally Posted by frank_rizzo
Code:
ssh remote_server /path/to/perl/script/foo.pl



Code:
ssh remote_server /path/to/perl/script/foo.pl $argument1 $argument2 ...



Code:
ssh remote_server /path/to/perl/script/foo.pl $argument1 $argument2 ... >output.log

hello

thanks for your answer

but i guess i didnt explain well

i need to create perl script to connect remotely to another server and run another perl script remotely


regards
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

Except script to run a local shell script on remote server using root access

local script: cat > first.sh cd /tmp echo $PWD echo `whoami` cd /tmp/123 tar -cvf 789.tar 456 sleep 10 except script: cat > first #!/usr/bin/expect set ip 10.5.15.20 set user "xyz123" set password "123456" set script first.sh spawn sh -c "ssh $user@$ip bash < $script" (1 Reply)
Discussion started by: Aditya Avanth
1 Replies

3. Shell Programming and Scripting

Run script on remote host

Hi friends, I have two servers. Server A and B. I want to run one script on server A by logging in to server B. Can anyone provide me code for this.? I tried it by using following ssh username@serverA ./script Then it prompt me the password. I give correct password of the server A. but it... (7 Replies)
Discussion started by: Nakul_sh
7 Replies

4. UNIX for Advanced & Expert Users

Unable to run the script on remote machine Using Expect script

Not able to execute the file in remote host using except utility I am automating the SFTP keys setp process: So i created the expect script for controlling the output of shell below is my main code: Code: #!/usr/bin/expect set fd set password close $fd set df set app close $df... (1 Reply)
Discussion started by: Manoj Bajpai
1 Replies

5. UNIX for Dummies Questions & Answers

Run a script on remote host

Hi, I wish to run a script located on a remote host machineB from machineA. I am using ssh and running the below on machineA. However, the ssh does not seem to work and freezes at ssh -l wlsadmin machineB -v Sun_SSH_1.1.2, SSH protocols 1.5/2.0, OpenSSL 0x0090704f debug1: Reading... (9 Replies)
Discussion started by: shifahim
9 Replies

6. Shell Programming and Scripting

How to run perl script in remote machine from java application?

Hi I am working in a java application. I need to execute a perl script(linux) which is in remote machine in java application from local machine(windows). I need to do this process automatically that is without manual intereption. Now I will explain the process clearly, at present to run the... (1 Reply)
Discussion started by: bassma
1 Replies

7. Programming

Expect script to run a Shell script on remote server

Hi All, I am using a expect script to run a shell script on remote server, the code is as follows. But the problem is that it executes only first command, and hangs it doesn't run the next commands. spawn ssh $uid@$host expect "password:" send "$password\r" expect "*\r" send... (2 Replies)
Discussion started by: yashwanthsn
2 Replies

8. Shell Programming and Scripting

Run a shell script from one host which connext to remote host and run the commands

I want to write a script which would run from one host say A and connect to other remote host B and then run rest of commands in that host. I tried connecting from A host to B with SSH but after connecting to host B it just getting me inside Host B command prompt. Rest of the script is not running... (6 Replies)
Discussion started by: SN2009
6 Replies

9. Shell Programming and Scripting

Run command on remote sever from script

I have two redhat linux server. i have created one script which contain some command that run on Local server as well as remote server.I am using this command to connect to remote server ssh user1@192.x.x.x 'command' but when i am running the script in local server it connecting to the server... (1 Reply)
Discussion started by: ranvijaidba
1 Replies

10. Shell Programming and Scripting

run a application from a remote server via script?

I have a ksh script that does a bunch of things, then runs telnet server_b I then manually login, manually run one command (which launches an application with display back to my workstation), then logout at which point the main script takes back over, runs something else, then ends. Is... (4 Replies)
Discussion started by: yankee428
4 Replies
Login or Register to Ask a Question