LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 04-03-2006, 01:23 PM   #1
Singist
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*\>\// ) {

$count++;

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, 02:22 PM   #2
centauricw
Member
 
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.
 
  


Reply


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 08:21 AM
rsh permission denied eozcan Linux - Security 2 12-07-2004 09:26 AM
rsh:permission denied linux Advanced server 2.1 rajamp Linux - Security 4 02-11-2004 12:33 PM
Permission Denied on a RSH Connection Eluminator Linux - Software 4 11-08-2002 03:06 AM
rsh. Permission denied pedroem Linux - Networking 2 10-09-2002 02:17 AM


All times are GMT -5. The time now is 06:16 AM.

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