LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   rsh connections : rcmd: socket: Permission denied (https://www.linuxquestions.org/questions/linux-networking-3/rsh-connections-rcmd-socket-permission-denied-423891/)

tiuz 03-11-2006 03:23 PM

rsh connections : rcmd: socket: Permission denied
 
Hello,
I have two computers running Slackware 10.2 (Kernel 2.6.15.5, SMP Kernel on both computers), these are only connected to each other, so no connection to the internet or any other network. No "firewall" is up on both.
For several reasons i need rsh instead of ssh.
I have configured /etc/inetd.conf to allow rsh:
shell stream tcp nowait root /usr/sbin/tcpd in.rshd -L
login stream tcp nowait root /usr/sbin/tcpd in.rlogind
exec stream tcp nowait root /usr/sbin/tcpd in.rexecd

Then on both computers the same user is set with ~/.rhosts on both computers
Then /etc/hosts.equiv is set on both computers, as well as /etc/hosts.allow which looks like this:
ALL: ALL
(to allow all connections from all hosts)
Again this two computers are only connected to each other via a small 2 port switch.

But when i try rsh rcp etc.. i get
rcmd: socket: Permission denied.

Can anybody tell me what else i could do try etc.. to get it working?
Is there another config file etc...

Thanks,
tiuz

jcliburn 03-12-2006 08:47 AM

Verify the perms on ~/.rhosts are 600 and owned by the user. man rcmd for details. See if that helps.

tiuz 03-13-2006 09:52 AM

~/.rhosts has permissions 600 and is owned by the correct user.
I have been testing around with the iBook later then and i found out that i can do a rsh from the iBook to both of the computers. Then i set up rsh on some old "Noname" Notebook where Slackware 10.2 is running and i can rsh from both "mainboxes" to the noname notebook. But when i try to rsh from one of the mainboxes to the other i still get
rcmd: socket: Permission denied.

jcliburn 03-13-2006 10:08 AM

Have you tried removing each of the two mainboxes from each other's /etc/host.equiv? I'm grasping at straws, but maybe stripping the problem down to the minimum number of variables might help. Remove hosts.equiv, remove .rhosts and see if you can login with a password.

tiuz 03-14-2006 04:58 AM

I have removed ~/.rhosts and /etc/hosts.equiv on both boxes and i canīt login with a password either.
rcmd: socket: Permission denied is all i get...
Could it be that the package which contains rsh has a bug?
Also i donīt find a "newer" package than the one i have installed for Slackware 10.2

jcliburn 03-14-2006 08:21 AM

I use Fedora 4, and the rshd version I run on my test server is

rsh-server-0.17-29.1.i386.rpm
$NetKit: netkit-rsh-0.17 $
$Id: rshd.c,v 1.25 2000/07/23 04:16:24 dholland Exp $

which is from the fedora-updates repository.

Is each of the mainboxes in the other's /etc/hosts file? The manpage for rcmd seems to imply that gethostbyname() needs to succeed.

tiuz 03-17-2006 11:41 AM

After some testing and playing around with it i guess there must be something wrong with the package i have installed, as other hosts expect the second Slackware-box can connect but the outgoing connections to other hosts just donīt work.
I try to get / install a newer version and see if that helps.

tiuz 03-18-2006 05:05 PM

Hmm, i reinstalled the package and found out that i can do rsh -l username host as user root but if i try to do this as normal user i get Permission denied, then i checked the permissions for rsh and rlogin which are correct.

josuecc 08-21-2009 08:21 AM

rsh in slackware whith root user
 
Gotten you do rsh with root ?

I have the same need !

Can tell me how to do ?

Thanks


All times are GMT -5. The time now is 04:59 PM.