03-07-2009
Look into a job queuing system like
SGE or
Torque. While these are meant for compute clusters, it makes sense to configure and install in your case. You simply submit jobs to the queue, which determines an appropriate cluster host to run on (you can also specify certain jobs to certain hosts, if needed), and when the job is done, you get an email with (optionally) the output of the command. Only a few ports are needed per machine, and it is a lot cleaner than RSH. I found SGE to be cleaner than Torgue. Both are free and open-source.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi
i am having two servers one is local and remote(FTP)server.from local server i have to connect to remote server and execute a shell script
i want to run a shell script(remote location) from my local server
i am having some knowledge on ftp but i am not getting the result .please give ... (2 Replies)
Discussion started by: srivsn
2 Replies
2. UNIX for Advanced & Expert Users
while using the rsh command to execute script S1 in the remote server it is not using the .profile in remote server.
The script S1 which is using sqlplus is not able to set up the ORACLE environment which is defined in .profile
Thanks in advance.... (3 Replies)
Discussion started by: jaiankur
3 Replies
3. Shell Programming and Scripting
Hi,
Im creating a script that is supposed to run commands on remote server using sftp.
My script is as below:
#!/bin/ksh
sftp remote_server
mypassword
cd /u08/mydir/allfiles
mget *
..
But this is what I got when I runned the script:
Connecting to remote server...... (3 Replies)
Discussion started by: luna_soleil
3 Replies
4. Shell Programming and Scripting
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
5. Shell Programming and Scripting
I have a command that I want to run on machine B from machine A. If I run the command on machine B locally, it works fine.
Here is the command:
for n in `find /data1/ -name 'ini*.ext'` ; do echo cp $n "`dirname $n `/` basename $n
.ext`"; done
From machine A, I issue this command ... (3 Replies)
Discussion started by: dirtyd0ggy
3 Replies
6. Shell Programming and Scripting
I am unable to run the below script against a remote server due to syntax error (then unexpected), but i am able to run it locally. Am i executing it correctly or is there any other way to execute it.
ssh username@servernname ksh -s < scriptname
#!/bin/ksh
function record
{
((end =... (5 Replies)
Discussion started by: NarayanaPrakash
5 Replies
7. Solaris
Hi,
I am trying to automate the process of fetching files from remote server to local server through sftp. I have the username and password for the remote solaris server. But I need to give password manually everytime i run the script.
Can anyone help me in automating the script such that it... (3 Replies)
Discussion started by: ssk250
3 Replies
8. Shell Programming and Scripting
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
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
Hello all,
i'm trying to create a report by greping a pattern on multiple remote hosts and creta a simple report,
actually i did this, is ther any better way to do this.
#!/bin/bash
for host in `cat RemoteHosts`
do
ssh $host -C 'hostname 2>&1; grep ERROR /var/log/WebServer.log.2019-09-21... (0 Replies)
Discussion started by: charli1
0 Replies
RSH() RSH()
NAME
rsh - remote shell
SYNOPSIS
rsh host [-l username] [-n] [-d] [-k realm] [-f | -F] [-x] [-PN | -PO] command
DESCRIPTION
Rsh connects to the specified host, and executes the specified command. Rsh copies its standard input to the remote command, the standard
output of the remote command to its standard output, and the standard error of the remote command to its standard error. This implementa-
tion of rsh will accept any port for the standard error stream. Interrupt, quit and terminate signals are propagated to the remote com-
mand; rsh normally terminates when the remote command does.
Each user may have a private authorization list in a file .k5login in his login directory. Each line in this file should contain a Ker-
beros principal name of the form principal/instance@realm. If there is a ~/.k5login file, then access is granted to the account if and
only if the originater user is authenticated to one of the princiapls named in the ~/.k5login file. Otherwise, the originating user will
be granted access to the account if and only if the authenticated principal name of the user can be mapped to the local account name using
the aname -> lname mapping rules (see krb5_anadd(8) for more details).
OPTIONS
-l username
sets the remote username to username. Otherwise, the remote username will be the same as the local username.
-x causes the network session traffic to be encrypted.
-f cause nonforwardable Kerberos credentials to be forwarded to the remote machine for use by the specified command. They will be
removed when command finishes. This option is mutually exclusive with the -F option.
-F cause forwardable Kerberos credentials to be forwarded to the remote machine for use by the specified command. They will be removed
when command finishes. This option is mutually exclusive with the -f option.
-k realm
causes rsh to obtain tickets for the remote host in realm instead of the remote host's realm as determined by krb_realmofhost(3).
-d turns on socket debugging (via setsockopt(2)) on the TCP sockets used for communication with the remote host.
-n redirects input from the special device /dev/null (see the BUGS section below).
-PN
-PO Explicitly request new or old version of the Kerberos ``rcmd'' protocol. The new protocol avoids many security problems found in
the old one, but is not interoperable with older servers. (An "input/output error" and a closed connection is the most likely
result of attempting this combination.) If neither option is specified, some simple heuristics are used to guess which to try.
If you omit command, then instead of executing a single command, you will be logged in on the remote host using rlogin(1).
Shell metacharacters which are not quoted are interpreted on the local machine, while quoted metacharacters are interpreted on the remote
machine. Thus the command
rsh otherhost cat remotefile >> localfile
appends the remote file remotefile to the local file localfile, while
rsh otherhost cat remotefile ">>" otherremotefile
appends remotefile to otherremotefile.
FILES
/etc/hosts
~/.k5login (on remote host) - file containing Kerberos principals that are allowed access.
SEE ALSO
rlogin(1), kerberos(3), krb_sendauth(3), krb_realmofhost(3)
BUGS
If you are using csh(1) and put a rsh(1) in the background without redirecting its input away from the terminal, it will block even if no
reads are posted by the remote command. If no input is desired you should redirect the input of rsh to /dev/null using the -n option.
You cannot run an interactive command (like rogue(6) or vi(1)); use rlogin(1).
Stop signals stop the local rsh process only; this is arguably wrong, but currently hard to fix for reasons too complicated to explain
here.
RSH()