Sponsored Content
Top Forums Shell Programming and Scripting Running a script on remote server kills my login session Post 302983423 by vbe on Tuesday 11th of October 2016 01:15:36 PM
Old 10-11-2016
Why are you using exec?
Or more you tell me what happens at the end of execution...
 

10 More Discussions You Might Find Interesting

1. 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

2. UNIX for Dummies Questions & Answers

mac 10.4>terminal>linux remote server>ssh login accepted>session closed-why?

mac 10.4>terminal>linux remote server>ssh login accepted>session closed-why? AHHHH!! I have been connecting to the server with the line: ssh userid@website.com The remote server accepts my password; logs me in with ssh; posts a lovely welcome message AND closes the session. Is this a "term... (0 Replies)
Discussion started by: xprankard
0 Replies

3. Shell Programming and Scripting

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... (0 Replies)
Discussion started by: chandrak
0 Replies

4. 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

5. 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

6. Shell Programming and Scripting

i want to execute shell script on remote server with in sftp session

Hi, I want to execute shell script with in sftp session for remote server. like i have a shell script test.sh that is on local server.i want to execute that script on remote server sftp user@192.168.56.10 sftp> test.sh ---execute for remote server not for local server. sftp... (3 Replies)
Discussion started by: SAUD PASHA
3 Replies

7. 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

8. 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

9. Shell Programming and Scripting

Remote login and running a script on multiple servers

Hi all, I am baffled on this. Solaris Irix system.:confused: I have 4 servers all connected to one another, :b: I need to write a script line that would login on to server 1-3 ($HOST) start a script in the back ground and log off while the back ground script runs over a length of time.:eek: ... (10 Replies)
Discussion started by: weddy
10 Replies

10. 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
Ns_Exec(3aolserver)					   AOLserver Library Procedures 				       Ns_Exec(3aolserver)

__________________________________________________________________________________________________________________________________________________

NAME
Ns_ExecArgblk, Ns_ExecArgv, Ns_ExecProc, Ns_ExecProcess, Ns_Fork, Ns_GetEnviron, Ns_WaitForProcess, Ns_WaitProcess, ns_fork - External process execution SYNOPSIS
#include "ns.h" int Ns_ExecArgblk(char *exec, char *dir, int fdin, int fdout, char *args, Ns_Set *env) int Ns_ExecArgv(char *exec, char *dir, int fdin, int fdout, char **argv, Ns_Set *env) int Ns_ExecProc(char *exec, char **argv) int Ns_ExecProcess(char *exec, char *dir, int fdin, int fdout, char *args, Ns_Set *env) int Ns_Fork(void) char **Ns_GetEnviron(void) int Ns_WaitForProcess(int pid, int *statusPtr) int Ns_WaitProcess(int pid) int ns_fork(void) _________________________________________________________________ DESCRIPTION
These functions handle fork and exec operations. See files: nsd/exec.c, nsd/tclenv.c and nsthread/fork.c. Ns_ExecArgblk(exec, dir, fdin, fdout, args, env) Executes a command in a child process. Return process id of child process exec'ing the command or -1 on failure. Provides extended error checking and error messages. Ns_ExecArgv(exec, dir, fdin, fdout, argv, env) Execute a command in a child process using fork(2) and execve(2), returns the process id of child process exec'ing the command or -1 on failure. The child sends an extended error message to the parent. Ns_ExecProc(exec, argv) Executes a command in a child process. Returns the process id of the child process exec'ing the command or -1 on failure. Simpli- fies call to Ns_ExecArgv. Ns_ExecProcess(exec, dir, fdin, fdout, args, env) Executes a command in a child process. Returns the process id of the child process exec'ing the command or -1 on failure. Calls Ns_ExecArgblk with same arguments. Ns_Fork() Posix style fork(), using fork1() on Solaris if needed. See fork(2) man page. Calls ns_fork. Ns_GetEnviron() Returns pointer to the environment vector. Ns_WaitForProcess(pid, statusPtr) Wait for child process. Returns NS_OK on success, or NS_ERROR on failure. *statusPtr is set to the exit code of the child process. Ns_WaitProcess(pid) Wait for child process. Calls Ns_WaitForProcess with NULL statusPtr. Returns NS_OK on success, or NS_ERROR on failure. ns_fork() Posix style fork(), using fork1() on Solaris if needed. SEE ALSO
nsd(1), info(n) KEYWORDS
AOLserver 4.0 Ns_Exec(3aolserver)
All times are GMT -4. The time now is 05:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy