Operating System - Linux
1822399 Members
3002 Online
109642 Solutions
New Discussion юеВ

Re: Rlogin is working but rcp and rsh is not working

 
sacthivel.C
Frequent Advisor

Rlogin is working but rcp and rsh is not working

Hai,
we have 2 servers A and B. We are doing rcp from server A to server B.
Yesterday The server B was crashed and we formatted and reinstalled the os without formatting the home partition.
I configured the hosts.allow,hosts.deny,hosts.equiv and .rhosts in the server B.
Now i can able to rlogin to server B from server A but it isnot possible for me to run RCP and RSH from server A to B.
It is showing connetion refused.
There is no error messages in /var/log messages in both the servers.

Please help me to solve this issue.

Regards,
C.Sacthivel
5 REPLIES 5
Vitaly Karasik_1
Honored Contributor

Re: Rlogin is working but rcp and rsh is not working

by default ssh uses key authentication, not hosts.allow method.
see, for example http://everydaylht.com/howtos/system-administration/loggin-in-via-ssh-without-a-password/ this manual
Vitaly Karasik_1
Honored Contributor

Re: Rlogin is working but rcp and rsh is not working

BTW, messages from ssh you'll see in /var/log/secure
Matti_Kurkela
Honored Contributor

Re: Rlogin is working but rcp and rsh is not working

The server-side process of rlogin is called "rlogind", while the server-side process of rcp and rsh is "rshd". These server-side processes are normally started from inetd or xinetd whenever someone tries to connect using rcp/rsh/rlogin.

In most modern Linux distributions, they are neither installed nor enabled by default, because these services are not secure: you must deliberately install & enable them if you wish to use them.

Looks like your server B has no rshd service enabled, or there is a firewall/iptables rule that is configured to block rsh/rcp requests.

If you have a RedHat Enterprise Linux 5 (or Centos 5) system, use "yum install rshd" to make sure the rsh server is installed on server B. Then use "chkconfig --list rshd" to see if it's enabled; if it is not, enable with "chkconfig rshd on".

Use "iptables -L" to see if your system has iptables firewall rules configured. If it has, you'll have to create a rule for rcp/rsh access. In RHEL, you can use "system-config-securitylevel" to allow access to port 514/TCP ( = the rshd port) from the necessary network segment(s).

MK
MK
Vitaly Karasik_1
Honored Contributor

Re: Rlogin is working but rcp and rsh is not working

oh, sorry, please ignore my answers - I wrote about ssh/scp, not rcp.
sacthivel.C
Frequent Advisor

Re: Rlogin is working but rcp and rsh is not working

Hai MK,

Thanks for the reply.

The following is the statue of server B :

Os Version - RHEL AS 4 Update 4
Iptables - disabled
/etc/xinetd.d/rlogin - disable = no
/etc/xinetd.d/rsh - disable = no
nmap - 513/514 open

I can execute RCP or RLOGIn successfully from B to A but it is not possible for me to run RCP/RSH from A to B.

I am ready to provide any details you require.

Regards,

C.Sacthivel