Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
| 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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
07-23-2001, 01:12 PM
|
#1
|
|
LQ Newbie
Registered: May 2001
Posts: 14
Rep:
|
rsh localhost - connection refused
RH7.0
The hosts file contains:
Code:
127.0.0.1 server2.intranet.net server2 localhost.localdomain localhost
hosts.equiv contains:
Code:
server2.intranet.net
hosts.allow and hosts.deny are empty (same as old working machine).
rhosts contains:
Code:
server2.intranet.net
server2
All of these files were pulled off another machine, which was working fine (able to accept rsh connections). The new machine is replacing the machine I copied from, so no need to change any of the host names/domains.
Any ideas on why I'm getting 'connection refused'?
|
|
|
|
07-23-2001, 08:47 PM
|
#2
|
|
Guru
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154
Rep:
|
I am not sure of this but, I think that running a remote command on a remote computer has to be run from a remote computer.
The only requirement I know of is that the Host be in .rhosts
Of course the port has to be open. I guess it should be in /etc/services
Can you use ssh instead
Last edited by DavidPhillips; 07-23-2001 at 08:53 PM.
|
|
|
|
07-23-2001, 10:39 PM
|
#3
|
|
Member
Registered: Jul 2001
Location: Utah
Distribution: RedHat v7.3, OpenBSD 3.3, FreeBSD 5.0
Posts: 327
Rep:
|
Agreed. RSH is a nonsecure remote login option. If you haven't considered it and can get away with it, use SSH instead. More secure, and more options.
HTH
|
|
|
|
07-24-2001, 07:58 AM
|
#4
|
|
LQ Newbie
Registered: May 2001
Posts: 14
Original Poster
Rep:
|
I have to have RSH working in order to be able to use rsync.
My hosts and .rhosts files contain the proper name for the remote system - not a nickname. I also checked file permissions - both are owned by root and are read only.
[btw, I can rsh localhost on the main computer without a hitch (prompts me for a username/pw, and I log in).]
|
|
|
|
07-24-2001, 11:33 AM
|
#5
|
|
LQ Newbie
Registered: Jul 2001
Distribution: LMdk 7.x mostly
Posts: 19
Rep:
|
Re: rsh
If you get the login and password prompts, then something is wrong.
Also, add localhost to your /root/.rhosts and /etc/hosts.equiv files.
/etc/hosts.equiv perms should be "-rw-r--r-- 1 root root" and /root/.rhosts s/b "-rw------- 1 root root" and /home/someuser/.rhosts should be "-rw------- 1 someuser somegroup"
Owned by the users using rsh and 0600 for permissions.
Also /etc/inetd.conf needs to be enabled (remove the "#" from the line) or /etc/xinetd.d/rsh needs to have "disable = no" set
Anything out of place and it just won't work.
|
|
|
|
07-25-2001, 09:54 AM
|
#6
|
|
LQ Newbie
Registered: May 2001
Posts: 14
Original Poster
Rep:
|
SOLUTION
Skot, all that was checked already -- the existing files were pulled off of a known good machine (which was replaced with the one I've been working with).
The solution to this frustrating problem is so simple, I could kick myself for overlooking it.
I checked ntsysv and found the problem - rsh wasn't loading on boot. Remote machines (and localhost) were refused connection because rsh wasn't running. After enabling rsh on boot and restarting, rsh is working great.
Problem solved.
Thanks for the replies fellas.
|
|
|
|
10-19-2007, 01:11 AM
|
#7
|
|
LQ Newbie
Registered: Sep 2007
Posts: 17
Rep:
|
hi
Quote:
Originally Posted by mstembri
Skot, all that was checked already -- the existing files were pulled off of a known good machine (which was replaced with the one I've been working with).
The solution to this frustrating problem is so simple, I could kick myself for overlooking it.
I checked ntsysv and found the problem - rsh wasn't loading on boot. Remote machines (and localhost) were refused connection because rsh wasn't running. After enabling rsh on boot and restarting, rsh is working great.
Problem solved.
Thanks for the replies fellas.
|
I have got the very similar problem in Solaris, probably my problem is similar to you have. All configurations are in correct order I still getting connection refused error!
Could you please explain about how to check ntsysv ? and how to or from where enable the rsh running ? a little bit in details ?
|
|
|
|
10-19-2007, 01:20 AM
|
#8
|
|
Moderator
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
Please read your rsync manpage because you should be able to use ssh as a transport instead of rsh.
Code:
SETUP
See the file README for installation instructions.
Once installed, you can use rsync to any machine that you can access
via a remote shell (as well as some that you can access using the rsync
daemon-mode protocol). For remote transfers, a modern rsync uses ssh
for its communications, but it may have been configured to use a dif‐
ferent remote shell by default, such as rsh or remsh.
You can also specify any remote shell you like, either by using the -e
command line option, or by setting the RSYNC_RSH environment variable.
Note that rsync must be installed on both the source and destination
machines.
Since you already checked that the port is open in the firewall, don't be offended if I ask if the rsh daemon is running on the target machine. It's about the only thing not brought up yet.
|
|
|
|
10-19-2007, 03:34 AM
|
#9
|
|
Moderator
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
I spent too much time reading through the manpages and missed your last post. I would look into using ssh as the rsync transport.
|
|
|
|
10-21-2007, 06:34 AM
|
#10
|
|
Moderator
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
You can use chkconfig to set which runlevels a service runs. To have sshd run in runlevels 3 and 5:
sudo /sbin/chkconfig -s sshd 35
|
|
|
|
10-22-2007, 07:24 AM
|
#11
|
|
LQ Newbie
Registered: Sep 2007
Posts: 17
Rep:
|
Quote:
Originally Posted by jschiwal
You can use chkconfig to set which runlevels a service runs. To have sshd run in runlevels 3 and 5:
sudo /sbin/chkconfig -s sshd 35
|
can I use chkconfig in Solaris ? As a matter of fact sudo is compatible with Solaris 5.9 or 5.10 ??
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 09:13 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
|
|