-   Linux - Newbie (
-   -   rlogin works but rsh with command, gives error (

fawcaz 06-02-2012 04:36 PM

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


delis 06-03-2012 02:20 PM

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)

fawcaz 06-05-2012 09:12 AM

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

delis 06-06-2012 10:19 PM

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.

All times are GMT -5. The time now is 04:01 AM.