remsh from HP-UX to Solaris


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers remsh from HP-UX to Solaris
# 1  
Old 03-26-2009
remsh from HP-UX to Solaris

Hi,

I have encountered a problem when I try to issue a remsh command to a remote system (Solaris).

I have created the .rhost file in the home directory on the remote system and added the hostname and user.

"cat .rhosts
192.168.133.26 root"

But when I issue the command from the local system (HP-UX) I recieve the following error.

"remsh 192.168.133.185 ls -l root
permission denied"

Someone who can help me out here? Do I need to restart any service to make work?

Thanks,

/Andreas
# 2  
Old 03-26-2009
What command did you type to get such message?
What are .rhosts permissions?
# 3  
Old 03-26-2009
.rhosts should contain the exact server name not an IP address or an alias.
# 4  
Old 03-27-2009
The local system.
[root@schassen]> remsh 192.168.133.185 ls -l root
permission denied
[root@schassen]>

On the remote system.
-rw-r--r-- 1 root root 21 Mar 26 15:33 .rhosts

root@hera> cat .rhosts
192.168.133.26 root
root@hera>
# 5  
Old 03-27-2009
As already mentionned, in .rhosts you should have the hostname, I usually for security reason set the files perms to -rw------ (some OS will not let you use if r for all)
And you should have the host in /etc/inet/hosts with:
<IP> <name> <fully qualifyed name>

You should also start by testing just remsh <hostname> to see if it asks you a passwd or not...
# 6  
Old 03-27-2009
Stage 1: Basic check.
First check that you have a normal localhost entry in your hosts file similar to this.
127.0.0.1 localhost loopback
Try remsh to localhost - you should get prompted for a password.
remsh localhost
Add localhost to root's .rhosts file.
localhost root
Try remsh to localhost - you should not get prompted for a password.
remsh localhost
Now REMOVE the localhost entry from .rhosts - it's a security hole.

Stage 2: First get remsh working within each computer such that you can remsh to yourself. This involves putting your local machine's host name in the local machine's .rhosts file and ensuring that the name agrees with the host's name in the local hosts file.

Stage 3: Assuming that both computers agree on the name for each other (nslookup computername) then transcribe the .rhosts entry to the opposing machine.

As previously advised the permissions on a .rhosts file are critical and the file will be ignored if they are wrong.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Remsh

Hello All, I am on HP-UX. Problem is that my remote script behaves different depending on execution method. Method1 (Remote execution): remsh remoteserver /home/myscript.sh Method2 (Local execution): remoteserver :/home#sh myscript.sh In method 2, I can succesfully set timestamp with... (6 Replies)
Discussion started by: mrcrowley
6 Replies

2. 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

3. Shell Programming and Scripting

Remsh

Hi All, Im using remsh to execute shell script on remote server. And this script gets called from another AIX server. My code is: remsh $rHost -l $rUser -n "export JAVA_HOME=/usr/java6_64_SR7; export ORACLE_HOME=/oravl01/oracle/11.1.0.7; export... (3 Replies)
Discussion started by: AB10
3 Replies

4. HP-UX

HPUX + remsh

Hi, I can remsh from a HPUX to a UNIX however my function keys dont then work as they should ! Any suggestions ? - have tried creating .kshrc Thanks (2 Replies)
Discussion started by: belfastbelle
2 Replies

5. HP-UX

remsh + HPUX

Hi, I am trying to remsh from a HPUX to another unix server What is happening is I cant run commands on the other server ie I can remsh <remoteserver> -l <remotelogin> but I cant remsh <remoteserver> -l <remotelogin> -n pwd getting error message rshd: 0826-826 The host name for... (3 Replies)
Discussion started by: belfastbelle
3 Replies

6. Solaris

remsh working one way

host Solaris 5.9 E250 host-name: sunsrv1 remote Solaris 5.8 Netra 250 host_name: sspfs_svr i am able to remsh (or rsh)from remote to host like ; $ remsh sunsrv1 uname -n sunsrv1 but opposite way not possible; # remsh sspfs_svr ls sspfs_svr: Connection refused OR # rsh -l username... (2 Replies)
Discussion started by: xramm
2 Replies

7. UNIX for Advanced & Expert Users

remsh problem

Hi All, We have 2 unix boxes HP UX. From Box1 we need to run a script on Box2 using remsh. The job at Box2 exits with status 0 on successful completion & 1 if fails. But even if the scrips fails (exits with return status 1) at Box2, the $? get the value 0. script at Box2 : remote_script.sh... (2 Replies)
Discussion started by: sabyasm
2 Replies

8. UNIX for Dummies Questions & Answers

remsh

i m try to do remsh i need to know what are the step to define the user and password i try .rhosts it give me operator:/export/home/operator>remsh billmed ps -ef permission denied just for testing (3 Replies)
Discussion started by: kazanoova2
3 Replies

9. UNIX for Dummies Questions & Answers

remsh question

Is there a way to execute more than one command on a remote server using remsh? (2 Replies)
Discussion started by: aaareyes
2 Replies

10. UNIX for Dummies Questions & Answers

remsh and nohup

I'm trying to nohup a job that executes a remote shell on another host but it breaks as soon as I launch it, and I get the following back to my terminal. + Stopped (tty input) nohup remsh target_host -l user "ls /proj" This is the command I'm running. nohup remsh target_host -l user "ls... (2 Replies)
Discussion started by: tavaresd
2 Replies
Login or Register to Ask a Question