Running a remote Server through perl script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Running a remote Server through perl script
# 1  
Old 02-13-2006
Running a remote Server through perl script

Hello people,


I am want to run a server on remote machine through perl scripting using telnet api. Now when I try to do so, the server gets started perfectly, but as soon as I close the telnet connection in the script, the server started on the remote machine suddenly goes down. I also tried starting it as background process but in vain. Is there any way I can start the server on remote machine through telnet or any similar thing, but not letting it go down unless and until I explicitly do so. Also, the script should be able to continue doing other things and not waiting on the process(Server) going down on the remote machine.

Thanks a lot,

Cheers
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script connect to remote server, not find files and exit only from remote server, but not from scrip

I have a script, which connecting to remote server and first checks, if the files are there by timestamp. If not I want the script exit without error. Below is a code TARFILE=${NAME}.tar TARGZFILE=${NAME}.tar.gz ssh ${DESTSERVNAME} 'cd /export/home/iciprod/download/let/monthly;... (3 Replies)
Discussion started by: digioleg54
3 Replies

2. Shell Programming and Scripting

Running a script on remote server kills my login session

Hi there, I'm trying to run a script remotely on a server in a particular directory named after hostname which already exists, my login session gets killed as soon as I run the below command. Not sure what is wrong, is there a better way to do it ? Note: I can also use nohup command to run... (14 Replies)
Discussion started by: mbak
14 Replies

3. Shell Programming and Scripting

How to Append the output of a script running in remote server to a file in local server?

Hi guys, So i am in server1 and i have to login to server 2, 3,4 and run some script there(logging script) and output its result. What i am doing is running the script in server2 and outputting it to a file in server 2 and then Scp'ing the file to server1. Similarly i am doing this for other... (5 Replies)
Discussion started by: srkmish
5 Replies

4. Shell Programming and Scripting

Running script on remote server

Hi All, I need to run a ksh script on around 200 servers(consisting of AIX,LInux,HP-UX,Solaris). The script is there in the /tmp directory of all the servers. I want want to execute the script in background on the respective servers and then exit from there. I have written something like below:... (8 Replies)
Discussion started by: proactiveaditya
8 Replies

5. Shell Programming and Scripting

Problem executing perl script on remote server

Hello, I am running in to a problem running a perl script on a remote server. I can run a simple script test.pl which contains just a print statment without issue by running ssh root@1.2.3.4 perl test.pl However, I have a more complex script that does not execute as expected. I think I... (3 Replies)
Discussion started by: colinireland
3 Replies

6. Shell Programming and Scripting

Running a function on a remote server via SSH in a script

I'm working on a script (mostly for practice) to simplify a task I have to do every now and then. I have a cluster with 6 servers on it, each server has a directory with a set of files called *.pid and *.mpid. Each file contains the pid of a process that may or may not be running on that server.... (3 Replies)
Discussion started by: DeCoTwc
3 Replies

7. Shell Programming and Scripting

How to stop a script running in remote server from local script

Hi, I have googled for quite some time and couldn't able to get what exactly I am looking for.. My query is "how to stop a shell script which is running inside a remote server, using a script"??? can any one give some suggestions to sort this out. (1 Reply)
Discussion started by: mannepalli
1 Replies

8. Shell Programming and Scripting

Running a Script in a Remote server

I am trying to write a script that would let me run a command in a remote server using ssh. scriptA: (dcm2nii is a command that only works on the other server) dcm2nii a b c scriptB: (I run this one on the current server) ssh -X otherserver /home/abc/Desktop/scriptA But when I do ... (2 Replies)
Discussion started by: ZeroGPX
2 Replies

9. Shell Programming and Scripting

Script to check running processes on remote server.

Hi, I am trying to write a script, which queries a db to get the names of processes, stores it in a file and then checks if that process is running on a remote server. However I am not getting it right, could anyone help me out. #!/bin/sh echo "select Address from Device where Cust =... (5 Replies)
Discussion started by: amitsayshii
5 Replies

10. Shell Programming and Scripting

running a script on remote server.

I need to run a script on a remote server from my ksh script. The issue I'm having is that I need to logon to the remote server as a different user. (see the following) logged on to server 1 as adsmgr neet to log on to server 2 as odemgr run passwd_util.ksh Thanks in advance. (1 Reply)
Discussion started by: whited05
1 Replies
Login or Register to Ask a Question
CON(1)							      General Commands Manual							    CON(1)

NAME
con, telnet, cu, rx, xms, xmr - remote login, execution, and XMODEM file transfer SYNOPSIS
con [ -dCrvs ] [ -l [ remuser ] ] [ -c cmd ] [net!]machine telnet [ -dCrn ] [net!]machine cu number rx [ -n ] [net!]machine [ command-word ... ] xms file xmr file DESCRIPTION
Con connects to the computer whose network address is net!machine and logs in if possible. With no options, the account name used on the remote system is the same as that on the local system. Standard input and output go to the local machine. Options are: -l with an argument causes remuser to be used as the account name on the remote system. Without an argument this option disables auto- matic login and a normal login session ensues. -C forces cooked mode, that is, local echo. -c runs cmd as if it had been typed as a command from the escape mode. This is used by cu. -v (verbose mode) causes information about connection attempts to be output to standard error. This can be useful when trying to debug network connectivity. -d causes debugging information to be output to standard error. -r suppresses printing of any carriage return followed by a new line. This is useful since carriage return is a printable character in Plan 9. -s strips received characters to 7 bits to forestall misinterpretation of ASCII with parity as UTF. The control- character is a local escape. It prompts with the local machine name and >>>. Legitimate responses to the prompt are i Send a quit [sic] signal to the remote machine. q Exit. b Send a break. . Return from the escape. !cmd Run the command with the network connection as its standard input and standard output. Standard error will go to the screen. This is useful for transmitting and receiving files over the connections using programs such as xms. Telnet is similar to con, but uses the telnet protocol to communicate with the remote machine. If standard input is a file or a pipe, the -n option causes telnet not to hang up the connection when it receives EOF on its standard input; instead it waits for the remote end to hang up. It shares con's -C, -d, and -r options. Cu is a shell script that uses telco(4) and con to connect to a machine via a modem. If the machine is equipped with a local modem, it is used. Otherwise, the call is placed through Datakit. Rx executes one shell command on the remote machine as if logged in there, but with local standard input and output. A rudimentary shell environment is provided. If the target is a Plan 9 machine, $service there will be rx. Network addresses for both con and rx have the form network!machine. Supported networks are those listed in /net. The commands xms and xmr respectively send and receive a single file using the XMODEM protocol. They use standard input and standard out- put for communication and are intended for use with con. EXAMPLES
rx kremvax cat file1 >file2 Copy remote file1 to local file2. rx kremvax cat file1 '>file2' Copy remote file1 to remote file2. eqn paper | rx kremvax troff -ms | rx deepthought lp Parallel processing: do each stage of a pipeline on a different machine. SOURCE
/sys/src/cmd/con for con, xms, and xmr. /sys/src/cmd/ip for telnet. /rc/bin/cu BUGS
Under rx, a program that should behave specially towards terminals may not: e.g., remote shells will not prompt. Also under rx, the remote standard error and standard output are combined and go inseparably to the local standard output. CON(1)