rsh localhost - connection refused
RH7.0
The hosts file contains: Code:
127.0.0.1 server2.intranet.net server2 localhost.localdomain localhost Code:
server2.intranet.net rhosts contains: Code:
server2.intranet.net Any ideas on why I'm getting 'connection refused'? |
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 |
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).] |
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. |
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. |
hi
Quote:
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 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. |
I spent too much time reading through the manpages and missed your last post. I would look into using ssh as the rsync transport.
|
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 |
Quote:
|
According to this page, Solaris has the scripts located in a different directory than Red Hat but you can still use chkconfig.
http://www.felipecruz.com/blog_solar...milarities.php Check your manpages to be certain. This post lists other options: http://www.linuxquestions.org/questi...-linux-462910/ |
All times are GMT -5. The time now is 05:21 AM. |