Operating System - HP-UX
1825720 Members
2945 Online
109686 Solutions
New Discussion

SUN Solaris 2.6 to HP-UX 11.0 rsh problem

 
SOLVED
Go to solution
Rommel Cuevas
Occasional Advisor

SUN Solaris 2.6 to HP-UX 11.0 rsh problem

Hello everyone, could you pls help me on this matter. i dont have anyone to ask about this.
I d like to tar files from my solaris box and send it to my HP box disk. (Note: i dont have enough disk space on my solaris). What i did is
ran this command as root: from sun-box:
tar cvf - /var | remsh -l dd=/dev/dsk/c2t6d0
The result says: permission denied.
And when i ran: remsh -l it prompt for a password.
Could you pls help on how to setup a trusted host on my solaris and HP box. Thanks in advance..
5 REPLIES 5
Laurie Gellatly
Honored Contributor
Solution

Re: SUN Solaris 2.6 to HP-UX 11.0 rsh problem

Think this means you have to add your sun machine's hostname or ip addres to the .rhosts file in the home directory of username on the HP machine.
Test with
remsh HP-IP address> -l ls
If you get permission denied you've still got
the problem.
Once that is sorted then you can progress.
I would have thought you would use:
tar cvf - /var | remsh -l tar -C /tmp -xvf -

HTH ...Laurie :{)
If you're not using OverTime, you're doing overtime!
Muthukumar_5
Honored Contributor

Re: SUN Solaris 2.6 to HP-UX 11.0 rsh problem

hai,

If you want to do this operation in a secured or trusted manner, use the ssh or sftp for this.

Because /etc/hosts.equiv,$HOME/.rhosts, and the rlogin/rsh protocol in general, are inherently insecure and should be disabled if security is desired.

create public key with ssh-keygen with dsa or rsa. See the ssh man page to know about ssh authentication. We can use ssh with out passwd by adding the public key in $HOME/.ssh/authorized_keys file

use scp to do this operation as a simple one.

Regards,
Muthukumar.
Easy to suggest when don't know about the problem!
Fred Ruffet
Honored Contributor

Re: SUN Solaris 2.6 to HP-UX 11.0 rsh problem

You could get rid of the password by setting up .rhosts file in the remote user's home dir. Be sure to remove .rhosts entries after transfert in order to remove security issues.

I see some problems in your command :
. If you do tar cvf on the sun, you should tar xf on the hp.
. Transmitting /var from sun to HP is not a good idea. /var content is a bit OS dependent.

Regards,

Fred
--

"Reality is just a point of view." (P. K. D.)
Bill Hassell
Honored Contributor

Re: SUN Solaris 2.6 to HP-UX 11.0 rsh problem

.rhosts in the $HOME directory is correct. Put the name of the Solaris box in the file. Most important though: the file MUST be 600 or 400 permissions, and the name of the Solaris box must be resolvable in both directions (nslookup sunbox and nslookup 12.34.56.78).

It is a very good accident that prevented you from transferring all of /var to the HP-UX machine. tar is a typical Unix command in that it does what you tell it to so saving /var means that tar can only restore back to the original path. For safety and versatility, cd to /var and then tell atr to save the current directory, either tar cvf - . or tar cvf - * to get a backup with relative and not absolute directories.

The dd=/dev/dsk/c2t6d0 won't work either. dd needs an input file (default is stdin) but most important, an output file. If you specified dd of=/dev/dsk/c2t6d0, you would have destroyed your disk (no recovery possible, requires a reinstall). If you have space in a particular filesystem on the HP-UX side, you could change the of= to: of=/mnt1/sunvar.tar or similar.

Finally, I don't believe Solaris has a Trused system concept. You can implement a shadow password on the Solaris side which is similar to HP's Trusted capability. For HP-UX, use SAM and select Auditing and Security -> Audited Events. SAM will ask you if you want to convert to a trusted system.


Bill Hassell, sysadmin
Rommel Cuevas
Occasional Advisor

Re: SUN Solaris 2.6 to HP-UX 11.0 rsh problem

mat & fred, thank u for bringing up the security issues. i really appreciate it.

Bill&Laurie: I could not done it with out ur help, again thank u very much. more power to u guys!