System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

connect second port: Connection timed out

Asya
Regular Advisor

connect second port: Connection timed out

Hi everyone,

I have the following problem and i'm totally stuck.

I have windows box (A) and an hp-ux box (B).

I'm trying to run the following command from HP box:

rsh hostname(B) -l root ls

It works the first time, if i run the same command 3 seconds later, it doesn't. If i wait about a minute, it works once again.

Same command works fine if i run it against a Solaris box over and over.

Same command works fine if i run it against another HP-UX box over and over.

The only thing i see in logs:

connect second port: Connection timed out

Any ideas?

Here is my .rhosts file:

bash-2.04# more /.rhosts
+ +
bash-2.04# ls -la /.rhosts
-rw-rw-rw- 1 root sys 4 Jun 4 12:08 /.rhosts
bash-2.04#

Thank you!
Asya
9 REPLIES
Asya
Regular Advisor

Re: connect second port: Connection timed out

Sorry! i run rsh command from Windows! box to HP box.
Mel Burslan
Honored Contributor

Re: connect second port: Connection timed out

I do not believe it is relevant as you are able to connect the first time, but try changing permissions of .rhosts to 400

while doing this, try to observe the syslog live on your hpux box with command:

tail -f /var/adm/syslog/syslog.log

the messages logged into the syslog might tell you why the second connection is timing out.
________________________________
UNIX because I majored in cryptology...
Asya
Regular Advisor

Re: connect second port: Connection timed out

Thank you, Mel.

i changed permissions and ran command again.

Jun 4 13:37:36 losal173 remshd[22936]: connect second port: Connection timed ou
t

Thanks again..
Mel Burslan
Honored Contributor

Re: connect second port: Connection timed out

if you have a chance, try making the second connection form a different machine. I am wondering if there is a server based firewall-like application, not allowing remshd connections more than once.
________________________________
UNIX because I majored in cryptology...
Asya
Regular Advisor

Re: connect second port: Connection timed out

Mel,

what i've noticed is that if i open another DOS window and run this command 3 seconds later, it works. I checked and there are no windows firewalls running. There is an Antivirus running, which is company wide and i can't even disable to test this theory out, but why would it be a problem if connection to solaris box always works?

Thank you.
Mel Burslan
Honored Contributor

Re: connect second port: Connection timed out

Then it sounds like your windows box is not terminating the connection upon the execution of rsh command finishes, but waits for a minute or so, during which your connection attempts are getting rejected. Is the output line you gave in your second post, i.e.,

Jun 4 13:37:36 losal173 remshd[22936]: connect second port: Connection timed out

coming from the hpux box syslog or got displayed on your windows machine (DOS Prompt) ?
________________________________
UNIX because I majored in cryptology...
Asya
Regular Advisor

Re: connect second port: Connection timed out

Mel,

this is from syslog on my hp-ux box. I don't see any error messages on the windows box.

Thanks
Asya
Regular Advisor

Re: connect second port: Connection timed out

Same thing happens when i try to connect from another hp-ux box.

remsh losal173 -l root ls
works

If i try it a second later, it doesn't.

couple more seconds later it works again...
Asya
Regular Advisor

Re: connect second port: Connection timed out

One more thing.. I installed tcpwrapper and get the following in syslog:

fault values
Jun 5 14:16:20 losal173 remshd[26255]: allowed connection from glade
Jun 5 14:16:25 losal173 remshd[26258]: allowed connection from glade.smarts.com
Jun 5 14:17:41 losal173 remshd[26258]: connect second port: Connection timed out
Jun 5 14:18:50 losal173 remshd[26267]: allowed connection from glade
Jun 5 14:18:51 losal173 remshd[26270]: allowed connection from glade
Jun 5 14:19:01 losal173 remshd[26271]: allowed connection from glade
Jun 5 14:19:02 losal173 remshd[26274]: allowed connection from glade
Jun 5 14:19:11 losal173 remshd[26275]: allowed connection from lwqdt088
Jun 5 14:19:12 losal173 remshd[26278]: allowed connection from lwqdt088