1829187 Members
18297 Online
109986 Solutions
New Discussion

RCP Problem

 
Bogdan Bachis
New Member

RCP Problem

Hi,

I'm trying to execute some rsh commands on a RedHat server from my NT station. If I execute a first command (for ex. ls -l), everything is OK. But if I'm trying to run a second command (after 10 sec., for example) I get a "connection timeout" error. If I wait 30 sec. between consecutive rsh calls, everything works fine.
Any ideea how can I run rsh commands faster?

Thanks,
Bogdan Bachis.
13 REPLIES 13
Stuart Browne
Honored Contributor

Re: RCP Problem

When you run the second 'r' command, do any erros get posted to the log files on your Linux box giving a reason why it failed?

I've not seen such errors, but I was also unaware that NT came (nativly) with 'rsh' and 'rcp' tools. Which tools are you using?
One long-haired git at your service...
Bogdan Bachis
New Member

Re: RCP Problem

Hi,

Thanks for your reply. I had no ideea there is a log file on the Linux box... Can you pls. tell me where I can find it?
Rcp and rsh are incorporated into the NT O.S.. We have also a HP-UX server here, and I can execute rcp and rsh on that box without problems. So, obviuosly something is wrong with the configuration on the Linux machine...

Bogdan Bachis.
Sachin Patel
Honored Contributor

Re: RCP Problem

It is in /var/log and the file name is messages.

open up lunix window and run this command
#tail -f /var/log/messages

Then run rsh from another command window (on NT) and you will see the error messages.

Sachin
Is photography a hobby or another way to spend $
Stuart Browne
Honored Contributor

Re: RCP Problem

Hrm. Shows you how long it's been since I've used NT *guilty look*.
One long-haired git at your service...
Bogdan Bachis
New Member

Re: RCP Problem

Hi,

I've found a rsh command that displays debugging messages. After running this command several times, I get this message:
"Cannot connect to the RSH port!"
I've looked also in the log file, and there's no entry for the commands that failed. So obviously, the commands are not arriving to the rshd server anymore.
Any other ideas?
Sachin Patel
Honored Contributor

Re: RCP Problem

Hi
Now we are getting somewhere.
it says cannot connect to rsh port.

check your /etc/inetd.conf file.
shell stream tcp nowait.512 root /usr/sbin/tcpd in.rshd
login stream tcp nowait root /usr/sbin/tcpd in.rlogind
exec stream tcp nowait root /usr/sbin/tcpd in.rexecd

This three should be uncommented.

rshd server checks the client's source port. If the port is not in the range 512-1023, the server aborts the connection.

Sachin
Is photography a hobby or another way to spend $
MiQUET Pascal
Occasional Advisor

Re: RCP Problem

Did you check your services on your linux box.
They should be activated.
Mark Fenton
Esteemed Contributor

Re: RCP Problem

Which version of RedHat is the server running?
Under 7.0 and newer, RedHat uses xinetd vice inetd to run services. The configuration files for xinetd are in
/etc/xinetd.d, one per service

(vice one line per service in /etc/inetd.conf)

The restrictions on port of origin remain, as Sachel noted.

hth
Mark
Bogdan Bachis
New Member

Re: RCP Problem

Hi,

My inetd.conf file looks like this:

shell stream tcp nowait.400 root /usr/sbin/tcpd in.rshd -h
login stream tcp nowait.400 root /usr/sbin/tcpd in.rlogind
exec stream tcp nowait.400 root /usr/sbin/tcpd in.rexecd -h

The client port is Ok, since some commands are still executed. I guess the configuration on my Linux box doesn't allow me to run more than 2-3 commands at the same time (although the nowait.400 option is specified in the inetd.conf file). Any other ideas?
Stuart Browne
Honored Contributor

Re: RCP Problem

/etc/inetd.conf eh? What distribution/version are we talking about here?
One long-haired git at your service...
Bogdan Bachis
New Member

Re: RCP Problem

Hi,

I'm talking about RedHat 6.2.
Stuart Browne
Honored Contributor

Re: RCP Problem

Alright, time to check some things.

Looking at my system here, I can't see what the '-h' flag actually does. Where'd you get the argument list from?

Besides that, could I get you to show us what you have in /etc/pam.d/rsh ?

It also might be an idea to get a tcpdump from the LInux box to see if the packets are getting there successfully (ie, not getting routed off to some distant router or machine accidentally) etc.
One long-haired git at your service...
Mark Fenton
Esteemed Contributor

Re: RCP Problem

Another thought -- is there a firewall in play?

Connections limited to so many per second/minute sounds like something that decent firewalls are supposed to manage......

hth
Mark