[Solved] remsh command on hp-ux


 
Thread Tools Search this Thread
Operating Systems HP-UX [Solved] remsh command on hp-ux
# 1  
Old 01-04-2011
[Solved] remsh command on hp-ux

hello,
i have 4 hp-ux servers (srv1,srv2,srv3,srv4)
srv1 is used to remsh srv2,srv3,srv4

/etc/hosts is configured on all servers and they can ping each other by ip,hostname and alies

in srv2,srv3,srv4, .rhosts file is configured in user home with the entry:
srv1 srv1_user

/etc/inetd.conf is checked

as srv1_user on srv1, i tested remesh to all other servers:

Code:
 
srv1> remsh srv2 -l srv2_user uname -n
srv2 
 
srv1> remsh srv3 -l srv3_user uname -n
srv3
 
srv1> remsh srv4 -l srv4_user uname -n
remshd: Login incorrect.

srv4 can remsh srv1
Code:
srv4> remsh srv1 -l srv1_user uname -n
srv_1

i made sure about /etc/hosts and .rhosts files
but i cannot remsh from srv1 to srv4

is there service has to be started on srv4 or how to make sure that all needed services for remsh are up .. what am i missing Smilie

thank you

Last edited by neemoze; 01-04-2011 at 12:19 PM..
# 2  
Old 01-04-2011
Try to connect to srv4 using remsh:
Code:
remsh srv4

It should at least ask you the passwd...
If after giving the (good) passwd it works, it leaves you with perms issue on .rhosts or..
If you dont even get there, then you may have the service denied (remsh not a valid login...) you would have to look at /var/adm/inetd.sec
This User Gave Thanks to vbe For This Post:
# 3  
Old 01-04-2011
hi vbe..
with command in remsh it gives incorrect login:
Code:
 
srv1> remsh srv4 -l srv4_user uname -n
remshd: Login incorrect.

if i omit the command (uname -n) in remsh,
Code:
 
srv1> remsh srv4 -l srv4_user
Password:
srv4>

if omit user_name and command: (user in srv1 is different from srv4 which defined in .rhosts)
Code:
 
srv1> remsh srv4 
Password:
Login:
Password:
srv4>

all .rhosts files in all servers has 700 permission (for srv4 the owner of .rhosts is srv4_user and so on)

Last edited by neemoze; 01-05-2011 at 02:21 AM..
# 4  
Old 01-04-2011
(The .netrc process does not resolve aliases).

When logged in to server "srv4" issue "nslookup srv1" .
If it fails, fix /etc/hosts or your DNS according to circumstances.
If it works, whatever "nslookup" replies with as the "Name:" is the server name to put in the "srv1_user" line of the ".rhosts" file in the home directory of account "srv4_user" on server "srv4".

i.e. It is quite possible to "remsh" to a server by name but the ".rhosts" on the target computer contains a different name for the source computer. It must be possible to resolve the name of the source computer on the target computer.

Btw. Permissions for .rhosts should be 600 not 700. It must not be a link.

Make sure that the line in "/etc/inetd.conf" on "srv4" containing "remshd" is identical to the other servers and does not contain a "-l" switch (which would disable .rhosts processing).

Last edited by methyl; 01-04-2011 at 02:24 PM.. Reason: Assorted typos
This User Gave Thanks to methyl For This Post:
# 5  
Old 01-05-2011
hi methyl
- The name in nslookup is used in .rhosts
- 700 permission works with other servers. however i changed it to 600 (and 777 to test)
- remshd entry in /etc/inetd.conf is same as other servers

still not working.

Last edited by neemoze; 01-05-2011 at 02:22 AM..
# 6  
Old 01-05-2011
But in your last login using remsh in your previous post what user did you enter (you say nothing...) and was it successful?
Did you have a look at inetd.sec?

---------- Post updated at 10:40 ---------- Previous update was at 10:36 ----------

(I tend you use 640 perms on .rhosts...)
# 7  
Old 01-05-2011
Quote:
Originally Posted by vbe
Try to connect to srv4 using remsh:
Code:
remsh srv4

It should at least ask you the passwd...
If after giving the (good) passwd it works, it leaves you with perms issue on .rhosts or..
---------- Post updated at 03:28 AM ---------- Previous update was at 03:23 AM ----------

Solved:
it permission issue..permission on /home directory which under is srv4_user/.rhosts located

i changed the permission on /home and it works..thank you
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

[Solved] sed command help

Hello all. Im trying very hard to figure this out, but Im a newbie. I have a file that looks like this.... 6315551234 NJ224 5162224567 SUFF Im trying to put a command together that will make it into this.... UM,6315551234,,,,,NJ224,0 UM,5162224567,,,,,SUFF,0 Im all over the... (7 Replies)
Discussion started by: jay11789
7 Replies

2. UNIX for Dummies Questions & Answers

[Solved] Finger command

Hi, I am writing script to take last logon user id detials by using finger command. But I am getting below output. wer34 Feb 10:23 I NEED to display wer34 Feb 10 2013 10:23, Is there any way to get like this. (18 Replies)
Discussion started by: stew
18 Replies

3. Shell Programming and Scripting

[Solved] Setfacl command help

HI, How to use setfacl for a domain user? I have an AD domain name manjunath and a domain user of the same domain named boarduser1. My cluster is joined to the domain. I am trying to set ACL for the boarduser1 on a file. I have tried this: setfacl -m u:Manjunath\boarduser1:rwx <file>... (1 Reply)
Discussion started by: prinsh
1 Replies

4. Shell Programming and Scripting

[Solved] Tree as alias command

Hi, I have this command: ls -R | grep ":$" | sed -e 's/:$//' -e 's/*\//--/g' -e 's/^/ /' -e 's/-/|/' Works nicely to show the current file structure as a tree. I'd like to have it as an alias in '' but doesn't work just like that and I can't fix it with backslashes: alias tree='?' ... (4 Replies)
Discussion started by: borobudur
4 Replies

5. Solaris

[SOLVED] Issue with hostname command

Hi, i'm having issues with one of my db servers, each time i run the hostname command i get "-a" as result this is the only zone on this server where i have this issue. could any one help me with this issue (5 Replies)
Discussion started by: EduardoDiaz
5 Replies

6. Shell Programming and Scripting

[SOLVED] sed command

Help request, I have tsted this line of code for hours. The first line works and the second line returns the message " sed: command garbled.....". This is running on solaris. The "${} variables all have good values when echoed. ## /bin/sed -n '1,25p' ${file} >> ${MailFile} ... (3 Replies)
Discussion started by: millerg225
3 Replies

7. UNIX for Dummies Questions & Answers

[solved]Help with a sed command

So I have a bunch of strings in a file. Example Line ./prcol/trt/conf/conf-app/jobdefinition/trt-pre-extr-trt-step.jdef Intended Result pre-extr-trt-step So far I have parsed it out to the last bit, echo $line | cut -d'/' -f7 | cut -d. -f1Result trt-pre-extr-trt-step So I added a... (2 Replies)
Discussion started by: J-Man
2 Replies

8. UNIX for Dummies Questions & Answers

[Solved] Assistance with find command please

Trying to locate files less than xx days old, throughout all directories/subdirectories, but excluding certain types of directories and files. The directories I want to search all contain the same characteristic (dbdef, pldef, ghdef, etc), and there are subdirectories within that I need to... (2 Replies)
Discussion started by: Condmach
2 Replies

9. UNIX for Dummies Questions & Answers

[Solved] Reusing a 'NOT' command

Hi Guys I'm trying to search for all lines that that do not contain the dash (-) in it. eg - I have the following list of numbers.I want to see those that donot contain the (-) in it.In this case '20151' 20151-60882 20151-60883 20151-60891 20151 20151-60893 Thanking you in advance. (3 Replies)
Discussion started by: Prega
3 Replies

10. UNIX for Advanced & Expert Users

Remsh command

Hi Can any 1 tell me how to use REMSH command with example actually i wanted to run the following command on different severs thru script "df -k .| tail -1 | tr -s ' ' ' ' | cut -d ' ' -f5" :) please reply ASAP.:) (3 Replies)
Discussion started by: maddy_07
3 Replies
Login or Register to Ask a Question