Operating System - Linux
1827798 Members
2276 Online
109969 Solutions
New Discussion

Re: hlp rsh(rlogin,rcp,rexec) setup..local working, remote fail

 
jonathan huang
New Member

hlp rsh(rlogin,rcp,rexec) setup..local working, remote fail

Hi:
I am almost there but I don't know what I am missing.

I have a server using mandrake 9.1, two client one using mandrake 9.1 another redhat 9.0.

By follwoing previous discussions on this subject, I had installed rsh client, and server. using chkconfig or ntsysv to enable them. modify .rhosts, inspect pam.d/rlogin, modify /etc/securetty to enable root access. I think I am almost there! I can rlogin from mandrake client to mandrake server and rlogin back. No problem. I can rlogin to mandrake server from redhat client not problem. I can rlogin to redhat client from redhat client, no problem......
But I can't rlogin to redhat client from outside.
It seems rlogind is runging, otherwise I can't rlogin within the redhat system. I also checked .rhosts and it seems ok. When I try to login, it waits a little bit before return connection refused. Is there any log message I can check or how do I debug?

Jonathan
5 REPLIES 5
jonathan huang
New Member

Re: hlp rsh(rlogin,rcp,rexec) setup..local working, remote fail

This is an update. I finally nail down the problem....firewal! I have no idea what defaul redhat linux setup firewall and I couldn't config it using redhat tools. But once I disbale it , it works. I finaaly know it's firewall because I can't telnet the host with port 513. I hope I can document my lession once more for ones follows. By the way, in a closed lab environment, there is not need to use ssh.
Jerome Henry
Honored Contributor

Re: hlp rsh(rlogin,rcp,rexec) setup..local working, remote fail

Sure !
BTW, better use IPtables on RH9 than the default firewall.
And sure ssh is not necessary on LAN, and said to be risky anyway in open environment !
You can lean only on what resists you...
Balaji N
Honored Contributor

Re: hlp rsh(rlogin,rcp,rexec) setup..local working, remote fail

hi
good that you have figured out. are you inside a secure LAN. if not, would suggest you to consider using ssh instead of rlogin.

just in case u want, u can configure the firewall to allow only rlogin. check out the man pages of iptables and fire lokkit.

hth
-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
Steven E. Protter
Exalted Contributor

Re: hlp rsh(rlogin,rcp,rexec) setup..local working, remote fail

You can turn off the redhat firewall if you want. Thats a really bad idea. Though.

To run a test.

for iptables firewall...

service iptables stop

for ipchains firewall

service ipchains stop

Your best bet is to look at /etc/services and figure out what port the r-tools need and open it.

The files for configuration changes on the firewall are:

ipchains is /etc/sysconfig/ipchains
iptables is /etc/sysconfig/iptables

If you make changes, to apply them its
service restart

These are a little tough to grasp at first and you will want to do some reading.

What would be better is to install and use openssh. Then you configure port 22 open on your firewall and passwords will at least be transmitted in encrypted format.

Attaching a doc on how to exchange public keys, which allows for password free connections, even across the public internet.

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
Jerome Henry
Honored Contributor

Re: hlp rsh(rlogin,rcp,rexec) setup..local working, remote fail

100% agree with SEP.
BTW, on RH9, default is IPtables, as kernel is 2.4.x.
J
You can lean only on what resists you...