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 [-Kdnx] [-k realm] [-l username] host [command] DESCRIPTION
Rsh executes command on host. 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. Interrupt, quit and terminate signals are propagated to the remote command; rsh normally termi- nates when the remote command does. The options are as follows: -K The -K option turns off all Kerberos authentication. -d The -d option turns on socket debugging (using setsockopt(2)) on the TCP sockets used for communication with the remote host. -k The -k option causes rsh to obtain tickets for the remote host in realm instead of the remote host's realm as determined by krb_realmofhost(3). -l By default, the remote username is the same as the local username. The -l option allows the remote name to be specified. Kerberos authentication is used, and authorization is determined as in rlogin(1). -n The -n option redirects input from the special device /dev/null (see the BUGS section of this manual page). -x The -x option turns on DES encryption for all data exchange. This may introduce a significant delay in response time. 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 SEE ALSO
rlogin(1), kerberos(3), krb_sendauth(3), krb_realmofhost(3) 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 rogue(6) 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. Linux NetKit (0.17) August 15, 1999 Linux NetKit (0.17)
All times are GMT -4. The time now is 02:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy