Operating System - HP-UX
1833753 Members
2397 Online
110063 Solutions
New Discussion

Problems with remsh ... odd

 
Guy Mengel
Occasional Advisor

Problems with remsh ... odd

I have a problem where the command:
remsh server -l user ...works just great!
but when I type
remsh server -l user command ...I get this error: rcmd: primary connection shut down.

I cannot issue commands from this system to any other system (trusted) via remsh at all.
Any Ideas anyone?

The man page indicates a possible problem with security in inetd. I checked and all is well there (inetd.sec).

Note: the system is slightly different in that there is a bridge router between the HPUX box and the main network. It is a cayman 2E and is doing NAT (Network Address Translation). I have check the settings and protocols and all protocals are being allowed (rlogin,nfs,ftp,etc). I can do rsh from another remote SUN or remsh from other HP systems INTO the problem system above with no problem...I just can't do it FROM the problem system.

Any ideas appreciated! Thanks!
11 REPLIES 11
Sachin Patel
Honored Contributor

Re: Problems with remsh ... odd

Hi Guy,
Try remsh server -l username -n command. It is silly but you never know.

If remsh server -l username is working that means remsh is working.

Try remsh server command.
If this doesn't work then check that users $HOME/.rhosts file.

Sachin
Is photography a hobby or another way to spend $
Guy Mengel
Occasional Advisor

Re: Problems with remsh ... odd

Yes I tried that too (with the -n )...
.rhosts file is fine too. But sad to say the problem still exists.



Thanks Sachin for the help....
Bill McNAMARA_1
Honored Contributor

Re: Problems with remsh ... odd

does it work as root just
remsh server command
rather than with the -l user

try quoting " " the command..

Later,
Bill
It works for me (tm)
Guy Mengel
Occasional Advisor

Re: Problems with remsh ... odd

Bill, thanks for the reply...no this does not work either....I have tried all that I know.

Carsten Krege
Honored Contributor

Re: Problems with remsh ... odd

I would check the /var/adm/inetd.sec and /etc/inetd.conf file.

The line in inetd.conf should be:

shell stream tcp nowait root /usr/lbin/remshd remshd

Remove any reference to "shell" in inetd.sec and retry.

Carsten
-------------------------------------------------------------------------------------------------
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
Guy Mengel
Occasional Advisor

Re: Problems with remsh ... odd

Carsten, Thanks for the reply. These are the first things I tried. The inetd.conf and inetd.sec are set up correctly.

I can remsh host -l user to anywhere just fine and vice versa.

I cannot remsh host -l user command OUT of the system at all...the error still occurs.


Carsten Krege
Honored Contributor

Re: Problems with remsh ... odd

Sorry, I read this thread too fast. :(

But I have one more idea. Check your DNS setup, specifically check whether localost/loopback is correctly resolved as 127.0.0.1.

Carsten
-------------------------------------------------------------------------------------------------
In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move. -- HhGttG
Guy Mengel
Occasional Advisor

Re: Problems with remsh ... odd

Carsten, Thanks again.
I checked how localhost and looback are resolved. I used nslookup. The nsswitch file is set up to resolve files then DNS then NIS.

Both loopback and localhost resolve to 127.0.0.1

rgds
guy
Sachin Patel
Honored Contributor

Re: Problems with remsh ... odd

Hi Guy,
Are you doing
#remsh server -l user (as a root?)

and #remsh server -l user command (as a root too?)

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

Re: Problems with remsh ... odd

Hi Guy,
I have solution for your problem.
I just created problem here like

1. client & server are using nis for password.
So I run
client#remsh server date (It works great as root)

Then
client#sachin>remsh server date (It works as sachin)

But client# remsh server -l sachin date (didn't work)

On server I edit /etc/passwd file and add my name just above "+::-2:-2::..." line with blank password.

Now on client
#remsh server -l sachin date (works)

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

Re: Problems with remsh ... odd

Hello Guy
Just a thought how does the .rhosts file look on the box you are trying to remsh to?

192.xxx.xx.xxx +
will let everyone in.
192.xxx.xx.xxx root
will only let root in.


Richard