Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-30-2010, 01:19 AM
|
#1
|
LQ Newbie
Registered: Nov 2009
Posts: 10
Rep:
|
rcp connection refused
Dear friends,
I can use rcp commands by
/usr/bin/rcp test.txt linux181:/test/test.txt
But when i use,
"rcp test.txt linux181:/test/test.txt"
It show the following error,
connect to address 173.148.4.54 port 544: Connection refused
Trying krb4 rcp...
connect to address 173.148.4.54 port 544: Connection refused
trying normal rcp (/usr/bin/rcp)
Permission denied.
(or)
connect to address 173.148.4.54 port 544: Connection refused
Trying krb4 rcp...
connect to address 173.148.4.54 port 544: Connection refused
trying normal rcp (/usr/bin/rcp)
No route to host
===========================================
[root@linux54 ~]# cat /etc/xinetd.d/rsh
# default: on
# description: The rshd server is the server for the rcmd(3) routine and, \
# consequently, for the rsh(1) program. The server provides \
# remote execution facilities with authentication based on \
# privileged port numbers from trusted hosts.
service shell
{
socket_type = stream
wait = no
user = root
log_on_success += USERID
log_on_failure += USERID
server = /usr/sbin/in.rshd
disable = no
}
============================================
[root@linux54 ~]# cat /root/.rhosts
173.148.4.71 linux181
173.148.4.54 linux54
=============================================
No firewall on both m/c.
Please help tme to solve this issue.
Last edited by thiyagarajancs; 11-30-2010 at 01:21 AM.
|
|
|
11-30-2010, 07:14 AM
|
#2
|
LQ Newbie
Registered: Jan 2010
Location: Belgium
Distribution: Debian
Posts: 17
Rep:
|
Aside from rcp being very unsafe (because everything is being sent in cleartext over the network) and that you should use ssh or scp instead, maybe the following thread offers some useful advice:
http://www.linuxquestions.org/questi...denied-639111/
I think in particular this part, because you seem to have put your machines hostname after the ip-address in .rhosts:
Quote:
Originally Posted by beadyallen
Alright, your problem is most likely a mapping of usernames. I'm guessing that on the remote machines, you've got a .rhosts file containing a list of valid ip addresses. This will probably work fine for the 'root' and 'oracle' accounts, since these will exist on both machines. However, it's likely that your local username isn't valid on the remote machines. To fix it, you can add a line to the .rhosts file. For instance, if you want user 'geoff' (which is valid on your local machine, with ip address 192.168.1.32) to be able to copy things as the 'oracle' user on a remote machine, add the following to the .rhosts in the remote oracle user's home directory:
However, as I hinted at before, DON'T USE RCP/RSH/RLOGIN. Please. Especially not across the internet. Change to using ssh/scp instead. It's much more secure.
|
|
|
|
12-21-2010, 11:12 AM
|
#3
|
LQ Newbie
Registered: Oct 2009
Location: Aberystwyth
Distribution: Redhat 5
Posts: 23
Rep:
|
Beadyallens response was exactly what was the problem with my issue.
My scenario....
i have ServerA.doodle.com that contained a file called /transfers/TestA.
I also have ServerB.doodle.com where i wanted to copy the file to as user bob.
A user called bob needed to log onto ServerB and copy the TestA file from ServerA.
To get this to work....
On ServerA, I had to create a .rhosts file in the home directory for bob (/home/bob/.rhosts) and add the below line....
ServerB.doodle.com bob
This line allows bob on ServerB to access and copy files from ServerA
Then I logged onto ServerB as bob and ran the rcp command as below:-
rcp ServerA:/transfers/TestA /home/bob/
The main problem i had which had me going round in circles was that i never had the correct hostname of ServerA in the .rhosts file.
This needs to be input as your server resolves it.
i.e. I originally thought that because in my hosts file i had the nickname as ServerA it would figure it out, so i had...
ServerA bob
After amending this to the below it worked fine.
ServerA.doodle.com bob
Hope this helps someone.
|
|
|
All times are GMT -5. The time now is 10:42 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|