Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 04-03-2006, 02:23 PM   #1
LQ Newbie
Registered: Mar 2006
Location: England
Distribution: RedHat 9
Posts: 16

Rep: Reputation: 0
permission denied using rsh (security not an issue)

Hi all,
I am using a perl script that connects to hosts on a local network to monitor host activity. It uses rsh to connect to each host which in turn runs several commands. However i am getting permission denied when trying to connect even though .rhosts file on each host is set up to allow all hosts, and hosts.equiv file also set up correctly.

the code that rsh's is as follows

foreach $host (@hosts) {

print FH "<H3><A NAME\=\"$host\">$host\</A\></H3>";
print FH "<P>";

$cmd="hostname && vmstat && top -n 1 | head -n 20 && df -k";

foreach $host (@hosts) {

print FH "<TABLE BORDER=0>";

@result=`rsh $host -l root -K $cmd`;

foreach $line (@result) {

if ( $line =~/9[0-9]\%\s*\>\// ) {


print FH "<TR><TD> <A NAME\=\"$count\"><FONT COLOR\=\"RED\"\>$line</FONT\></A></TD></TR>";

@hosts is an array that holds all the hostnames on the network. To say im almost pulling my hair out at this stage is an understatement. Any help would be appreciated. i did get something to work at one stage but it only ran the commands on the machine that the perl script is running from. this script displays all the results from each machine in a web browser btw.

cheers in advance, Singist
Old 04-04-2006, 03:22 PM   #2
Registered: Dec 2005
Location: Lawrenceville GA
Distribution: Slackware, CentOS. Red Hat Enterprise Linux
Posts: 216

Rep: Reputation: 31
Have you made sure that the rsh services are enabled in the inetd/xinetd conf? Most Linux systems ship with these services disabled by default.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
rsh connections : rcmd: socket: Permission denied tiuz Linux - Networking 8 08-21-2009 09:21 AM
rsh permission denied eozcan Linux - Security 2 12-07-2004 10:26 AM
rsh:permission denied linux Advanced server 2.1 rajamp Linux - Security 4 02-11-2004 01:33 PM
Permission Denied on a RSH Connection Eluminator Linux - Software 4 11-08-2002 04:06 AM
rsh. Permission denied pedroem Linux - Networking 2 10-09-2002 03:17 AM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:36 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration