Linux - GeneralThis 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.
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.
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'?
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
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).]
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
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.
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 ?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.