Sponsored Content
Full Discussion: help rsh killer
Top Forums Shell Programming and Scripting help rsh killer Post 302187810 by gonzo on Tuesday 22nd of April 2008 03:46:11 AM
Old 04-22-2008
help rsh killer

hi everyone , i have a rsh problem , some of the users letf a lot of rsh sesions opened , i need a script that chek with a "ps -fea | grep rsh" and kill every sesion that not start today . for example
Code:
    root 26770 26767  0   Apr 17 ?        0:00 rsh c-108 find / -type d -mtime +1 -name ???-??-????.??.??
    root  8803  8802  0 19:38:45 ?        0:00 rsh c-108 find / -type d -mtime +1 -name ???-??-????.??.??
    root 17009  1950  0 09:36:27 ?        0:00 in.rshd
    root 29836 29835  0   Apr 20 ?        0:00 rsh c-108 find / -type d -mtime +1 -name ???-??-????.??.??
    root 14475  1950  0 09:34:22 ?        0:00 in.rshd
    root  6801  6790  0 09:27:59 pts/40   0:00 rsh suxro001 xterm -display 10.2.47.136:0 -T suxro001
    root  8146  7394  0   Apr 19 ?        0:00 rsh sliro298 /aplicaciones/pproduccion_v3/lanza_pase_v3.sh stop

i already do , but manual can anyone help me with that

pd: sorry for my english

Last edited by Yogesh Sawant; 04-22-2008 at 04:58 AM.. Reason: added code tags
 

6 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

where is rsh

Hi, when a user use rsh command (or any other) , where is the executable used by him ? Many thanks in advance. (1 Reply)
Discussion started by: big123456
1 Replies

2. Linux

Help in RSH

Hi All, I want to execute a command from my Windows machine to Linux machine. d:> rsh <Linux machine add> -l <user_name> pwd>dir in linux machine users home directory in .rhosts file I entered the windows machine IP address and user name. In linux etc/hosts.equiv file I entered the... (1 Reply)
Discussion started by: sarwan
1 Replies

3. UNIX for Advanced & Expert Users

Rsh

Hi All, I want to execute a command from my Windows machine to Linux machine using RSH only d:> rsh <Linux machine add> -l <user_name> pwd>dir in linux machine users home directory in .rhosts file I entered the windows machine IP address and user name. In linux etc/hosts.equiv file I... (1 Reply)
Discussion started by: sarwan
1 Replies

4. Red Hat

Rsh

Hi, I issue : rsh ****.16.0.151 -l root ls -l /tmp and I receive : connect to address ***.16.0.151: Connection refused Trying krb4 rsh... In hosts file of remote (***.16.0.151) I have : ***.16.0.202 root Can you help me ? Thank you. (0 Replies)
Discussion started by: big123456
0 Replies

5. UNIX for Advanced & Expert Users

OOM KIller INVOKE

Hi I have written a code that will exhaust the memory completely by allocating it and not freeing it. The OOM killer as expected in invoked and it killed a few high memory using processes and their childs. But after that, though the system is not getting hung, it is not printing any msgs in... (3 Replies)
Discussion started by: subratasaharia
3 Replies

6. Linux

RSH

Hi All, Whenever we are giving rsh localhost date , it give an error "Permission Denied". RHEL 6 is the version, and we're logging in as "root". in .rhosts file I have mentioned all the details, and enabled rsh,rsync,rexec,rlogin in /etc/xinetd.d/ file Please suggest. Reg, Muzaffar (7 Replies)
Discussion started by: muzaffar.k
7 Replies
RSH(1)							    BSD General Commands Manual 						    RSH(1)

NAME
rsh -- remote shell SYNOPSIS
rsh [-46dn] [-l username] [-t timeout] host [command] DESCRIPTION
The rsh utility executes command on host. The rsh utility 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. Interrupt, quit and terminate signals are propagated to the remote command; rsh normally terminates when the remote command does. The options are as follows: -4 Use IPv4 addresses only. -6 Use IPv6 addresses only. -d Turn on socket debugging (using setsockopt(2)) on the TCP sockets used for communication with the remote host. -l username Allow the remote username to be specified. By default, the remote username is the same as the local username. Authorization is deter- mined as in rlogin(1). -n Redirect input from the special device /dev/null (see the BUGS section of this manual page). -t timeout Allow a timeout to be specified (in seconds). If no data is sent or received in this time, rsh will exit. If no command is specified, you will be logged in on the remote host using rlogin(1). Shell metacharacters which are not quoted are interpreted on local machine, while quoted metacharacters are interpreted on the remote machine. For example, the command rsh otherhost cat remotefile >> localfile appends the remote file remotefile to the local file localfile, while rsh otherhost cat remotefile ">>" other_remotefile appends remotefile to other_remotefile. FILES
/etc/hosts /etc/auth.conf SEE ALSO
rlogin(1), setsockopt(2), rcmd(3), ruserok(3), auth.conf(5), hosts(5), hosts.equiv(5), rlogind(8), rshd(8) HISTORY
The rsh command appeared in 4.2BSD. BUGS
If you are using csh(1) and put a rsh 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 ee(1) or vi(1)) using rsh; use rlogin(1) instead. Stop signals stop the local rsh process only; this is arguably wrong, but currently hard to fix for reasons too complicated to explain here. BSD
October 16, 2002 BSD
All times are GMT -4. The time now is 11:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy