0

I have two systems, a Solaris and an Oracle Linux. I can rsh from OL to Solaris but not from Solaris to OL. I can also ssh from both machines.

I was reading this and I tried to create an rsh file in /etc/xinetd.d/ (which was initially empty) but it didn't work.

I also tried to restart xinetd service:

restart xinetd daemon

but I got the following:

Failed to issue method call: Unit xinetd.service failed to load: No such file or directory.

I tried some debugging when trying to connect from a remote system:

truss rsh -l root copernicus

The last seven lines are showing:

setsockopt(4, tcp, TCP_ANONPRIVBIND, 0xF9DACEB4, 4, SOV_DEFAULT) = 0
bind(4, 0xF9DACF20, 32, SOV_SOCKBSD)        = 0
getsockname(4, 0xF9DACF20, 0xF9DACEBC, SOV_DEFAULT) = 0
setsockopt(4, tcp, TCP_ANONPRIVBIND, 0xF9DACEB8, 4, SOV_DEFAULT) = 0
setsockopt(4, SOL_SOCKET, SO_EXCLBIND, 0xF9DACEB8, 4, SOV_DEFAULT) = 0
ioctl(4, FIOSETOWN, 0xF9DACFE8)         = 0
connect(4, 0xF9DAD100, 32, SOV_DEFAULT) (sleeping...)
030
  • 5,731
  • 12
  • 61
  • 107
Michael
  • 121
  • 1
  • 2
  • 1
    Why does `ssh` not meet your needs? `rsh` is outdated and insecure so I wouldn't recommend using it. `ssh` should be able to do everything you want to do with `rsh` – mjturner Jul 08 '15 at 14:59
  • I am running a legacy test with code that unfortunately cannot be changed. I need to use rsh on this one. – Michael Jul 08 '15 at 15:01
  • You need to look up how to enable rsh/rsh server for EL7 (CentOS7). – user9517 Jul 08 '15 at 15:03
  • You should use `ssh` anyway. http://docstore.mik.ua/orelly/networking_2ndEd/ssh/ch04_05.htm Write a shell script to implement enough of `rsh` via `ssh` to meet your code's needs. – chicks Jul 08 '15 at 15:04
  • @Michael Configure `ssh` with passwordless authentication and it's a drop-in replacement for `rsh` – mjturner Jul 08 '15 at 15:09

1 Answers1

1

If you really, really, really must use rsh, which I do not recommend, you will need to install it.

For RHEL7-based systems, do the following:

  1. Install the rsh-server package.

    yum install rsh-server

  2. Restart the rsh daemon (I'm assuming here you don't need rlogin and/or rexec).

    systemctl restart rsh.socket
    
  3. (Optional) Set the daemon to auto-start.

    systemctl enable rsh.socket
    

But please, please, please don't use rsh - ssh is far superior.

mjturner
  • 492
  • 3
  • 9
  • Thanks, I tried all the above -even rebooted- but didn't work. Do I have to edit any files as well? – Michael Jul 08 '15 at 15:23
  • @Michael Have you configured `rsh`? My instructions just covered the installation – mjturner Jul 08 '15 at 15:25
  • I set the .rhosts file to "+ root" to allow access from anyone as root. Secondly I tried to enable xinetd service. I went into /etc/xinetd.d/ which was initially empty and created an rsh file using the information provided at the link I gave at my question. Is xinetd necessary? – Michael Jul 09 '15 at 15:29
  • @Michael You don't need to configured `xinetd`, it's not necessary. You may need to modify `/etc/securetty' and add `rsh` to it. What are you seeing in your logs when you try and connect? – mjturner Jul 10 '15 at 08:44