Operating System - Linux
1822431 Members
2729 Online
109642 Solutions
New Discussion юеВ

Linux 2.4.21-20.EL telnet,rcp,rlogin connection refused

 
WilliamSmith11
Super Advisor

Linux 2.4.21-20.EL telnet,rcp,rlogin connection refused



Hi everybody ,
I want do a remote copy usin rcp command but when I isse the command send me a connection refused error.

My server name is denver

here are some caputure that I have done

# Do not remove the following line, or various
programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
10.1.11.47 hprp5430
10.1.11.1 denver
[root@denver /]#

[root@denver etc]# ls hos*
host.conf hosts hosts.allow hosts.deny
[root@denver etc]#

[root@denver etc]# more /etc/hosts.allow
#
# hosts.allow This file describes the names of the
hosts which are
# allowed to use the local INET
services, as decided
# by the '/usr/sbin/tcpd' server.
+hprp5430 10.1.10.47
+denver 10.1.11.1


[root@denver etc]#

[root@denver etc]# find / -name xinetd.d -print
/etc/xinetd.d
[root@denver etc]#

[root@denver etc]# cd /etc/xinetd.d
[root@denver xinetd.d]# ls
auth cups-lpd echo gssftp
kshell sgi_fam time-udp
chargen daytime echo-udp klogin rsync
swat
chargen-udp daytime-udp eklogin krb5-telnet
services time
[root@denver xinetd.d]#

[root@denver xinetd.d]# more /etc/hosts.deny
#
# hosts.deny This file describes the names of the
hosts which are
# *not* allowed to use the local INET
services, as decided
# by the '/usr/sbin/tcpd' server.
#
# The portmap line is redundant, but it is left to
remind you that
# the new secure portmap uses hosts.deny and
hosts.allow. In particular
# you should know that NFS uses portmap!


[root@denver xinetd.d]#

[root@denver xinetd.d]# find / -name xinetd* -print
/var/lock/subsys/xinetd
/var/run/xinetd.pid
/etc/sysconfig/xinetd
/etc/xinetd.d
/etc/rc.d/init.d/xinetd
/etc/audit/xinetd.conf
/etc/xinetd.conf
/usr/share/doc/xinetd-2.3.12
/usr/share/man/man5/xinetd.conf.5.gz
/usr/share/man/man8/xinetd.8.gz
/usr/share/man/man8/xinetd.log.8.gz
/usr/sbin/xinetd
[root@denver xinetd.d]#

My question is with thos LINUX version OS how I do to make a remote copy ?

I have done almost everything and have not been possible to get a connection .

Thank you


W:S
rperez
10 REPLIES 10
Stuart Browne
Honored Contributor

Re: Linux 2.4.21-20.EL telnet,rcp,rlogin connection refused

If you insist on using 'rcp', then you need to install the 'rsh-server' package.

However, I suggest against that, and using SSH (and 'scp') to do your remote copy.

Apart from the fact that it behaves pretty much the same as 'rcp' for copying processes, it's also does it in a secure/encrypted fashion.

If you want to do it passwordless, then you can set up a key between the machines quite easily. If you have a read through 'man ssh-keygen', in particular the parts about 'authorized_keys', or have a search through the forums here (as it's been discussed multiple times)..
One long-haired git at your service...
Steven E. Protter
Exalted Contributor

Re: Linux 2.4.21-20.EL telnet,rcp,rlogin connection refused

Shalom William,

If you insist on rsh, its activated after installation in the /etc/xinetd.d/ directory.

edit the file turn disable = yes to disable = no.

then

service xinetd restart

Or do a little more work and use openssh and be secure.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Frank Nardis
Advisor

Re: Linux 2.4.21-20.EL telnet,rcp,rlogin connection refused

I agree with previous replies - use scp!
All of the old rsh, rcp, telnet commands should not be used if ssh and scp are available to you (they are included with the distribution you are using). If you need to transfer multiple files that don't easily match a wildcard you can use WinSCP3 located here....
http://winscp.net/eng/index.php
it also supports sftp.
paolo barila
Valued Contributor

Re: Linux 2.4.21-20.EL telnet,rcp,rlogin connection refused

Your subject is "telnet,rcp,rlogin connection refused",
so what is actually working between your servers, how do you connect?
Does ssh work?
If so everybody is telling you to use "scp" and that's it. Nevertheless if there's some firewall in your network it could be another reason not to choose use rcp.
share share share
WilliamSmith11
Super Advisor

Re: Linux 2.4.21-20.EL telnet,rcp,rlogin connection refused

Steven here is the output for
# cd /etc/xinetd.d

[root@denver xinetd.d]# ls
auth cups-lpd echo gssftp
kshell sgi_fam time-udp
chargen daytime echo-udp klogin rsync
swat
chargen-udp daytime-udp eklogin krb5-telnet
services time

exactly what I must edit?.

I explain to the customer that rcp in not secure but he insist in rcp .
rperez
WilliamSmith11
Super Advisor

Re: Linux 2.4.21-20.EL telnet,rcp,rlogin connection refused

Sorry I have forget to say that I am working in the local console.
rperez
Indrajit_1
Valued Contributor

Re: Linux 2.4.21-20.EL telnet,rcp,rlogin connection refused

Hi;

To configure telnet and rlogin in linux, do the following steps

#vi /etc/xinetd.d/telnet

disable = no

#vi /etc/xinetd.d/rlogin

disable = no

save and come out

#service xinetd restart

To remotely copy file from one machine to another machine, i will suggest u to go with scp command

#scp file_name user_id@remote_host:/

for example

#scp file001 user1@testserver:/tmp

Cheers
indrajit
Never Ever Give Up
paolo barila
Valued Contributor

Re: Linux 2.4.21-20.EL telnet,rcp,rlogin connection refused

Let's suppose you have to copy from server A to server B,
How are you able to connect from A to B?
It seems you tried: telnet,rcp,rlogin...
Did you try:
ping?
ssh?
Which user are you tryng?
share share share
Bejoy C Alias
Respected Contributor

Re: Linux 2.4.21-20.EL telnet,rcp,rlogin connection refused

Dear,
It seems there is no telnet-server installed . There is no 'telnet' file in ur /etc/xinetd.d directory. For getting the telnet connection first install 'telnet-server' , then edit /etc/xinetd.d/telnet and edit 'disable=yes' to 'disable=no' then try telneting to the local host by 'telnet localhost' in ur console itself , if u r getting the connection then try telneting from other machines . For doing rcp u must have rsh-server installed . then edit /etc/xinetd.d/rlogin and change 'disable=yes' to 'disable=no' and restart xinetd using 'service xinetd restart' .
Be Always Joy ......
dirk dierickx
Honored Contributor

Re: Linux 2.4.21-20.EL telnet,rcp,rlogin connection refused

by default linux disables all these old legacy network tools. they are terribly outdated and insecure. in fact, they are not even installed anymore by default (but still available if you have _no_ other choice to use them).

i recommend getting familiar with the SSH suite of tools, which includes scp for copying needs. there is nothing you can't do with them that r* can, in fact they can do much more.