Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-02-2012, 03:36 PM   #1
LQ Newbie
Registered: Dec 2009
Posts: 12

Rep: Reputation: 0
rlogin works but rsh with command, gives error


Hope you don't mind me asking here, this problem is running RSH.. i'm running it in cygwin but the problem would apply to *nix too. I haven't had any luck asking on that mailing list. But I think the problem overlaps *nix completely, the error messages are standard rsh errors. It's only private on my LAN and i'm the only user. So no big security hazard. My question is re this error message.

I have 2 computers. jackw2 and jackw5.

Currently just trying from jackw5 to jackw2

On jackw2,
the inetd super server is running on ports 512,513,514 of jackw5 and those ports are open just to my subnet, so that's not the issue

I can run rlogin.

I can run from jackw5
$rsh jackw2
(as when running rsh with no command, it runs rlogin)
and it goes in with rlogin.

but if I run (still from jackw5)
$rsh jackw2 ls
$rsh -l userjackw2 jackw2 ls

Then it says
select: protocol failure in circuit setup

If I look at hosts.allow and hosts.equiv on jackw2
On jackw2 which i'm trying to connect to

$cat /etc/hosts.allow

and the file has (I added that 192.168 line before and after just incase , but it still isn't helping)

ALL : : allow
ALL : allow

sshd: ALL: allow

and if I do on jackw2
$cat /etc/hosts.equiv
it says <-- that's jacks5's ip

Old 06-03-2012, 01:20 PM   #2
LQ Newbie
Registered: Jun 2012
Posts: 10

Rep: Reputation: Disabled
1. Use SSH
ssh (SSH client) is a program for logging into a remote machine and for executing commands on a remote machine. It is intended to replace rlogin and rsh, and provide secure encrypted communications between two untrusted hosts over an insecure network.

2. Winsock error
I can't find it but i remember i read something about a windows API error that generates such a rsh message. But this maybe has already been fixed.

3. hosts_access
man hosts_access
for information about hosts.allow and hosts.deny

delete everything from hosts.allow
delete everything from hosts.deny

ALL: 192.168.1.
to hosts.allow (notice that the last octet of the IP is missing)

Last edited by delis; 06-03-2012 at 01:24 PM.
1 members found this post helpful.
Old 06-05-2012, 08:12 AM   #3
LQ Newbie
Registered: Dec 2009
Posts: 12

Original Poster
Rep: Reputation: 0
thanks..there may have also been a firewall issue too, 'cos possible the server makes a reverse connection to the client. But that line in hosts.allow helped, and i've removed/commented everything in hosts.deny. And I added hosts to /etc/hosts too.

But anyhow while those errors are cleared up , I now get "Permission Denied" when I do $rsh -l tony host ls
Even though i've got the source host in .rhosts on the dest machine. And of course, that line in hosts.allow
Old 06-06-2012, 09:19 PM   #4
LQ Newbie
Registered: Jun 2012
Posts: 10

Rep: Reputation: Disabled
A firewall is always a possible reason if a connection to another host does not work.

Check on the remote host if you have a file called .k5login in the homedir of user tony, if yes -> delete it

Delete .rhosts file in the homedir of tony.

Maybe you should give tony a new password to be sure you have the right one.

Delete everything from /etc/hosts.equiv on the remote host, do $rsh -l tony host ls, enter the password and check if this will work.

To avoid confusion either use /etc/hosts.equiv or .rhosts, but not both.

If you use .rhosts at any time notice that it is different from /etc/hosts.equiv because you can restict the remote user names that are allowed to connect. So if you have a .rhosts in the homedir of tony and it has an entry like "+ tony", then only tony FROM THE CONNECTING HOST is allowed to connect as user tony to the remote host.

Sorry for the late 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
[SOLVED] rsh and rlogin works but rcp doesn't work on my RHEL4 machine subbarai Linux - Newbie 5 09-29-2010 08:18 AM
rsh and rlogin not wotking rehan999 Linux - Software 1 05-14-2008 12:13 AM
Rsh , Rlogin Without password shan_nathan Linux - Security 8 08-18-2007 01:21 AM
Can't get rlogin, rsh to work in FC3 dangs Linux - Security 1 01-11-2005 11:45 AM
rsh and rlogin on Linux to HP-UX sammathew Linux - Networking 1 09-09-2003 04:17 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:16 PM.

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