Operating System - HP-UX
1833945 Members
1758 Online
110063 Solutions
New Discussion

RCP to Linux box from HP Box

 
Ravi Yarlagadda
Occasional Advisor

RCP to Linux box from HP Box

Red Hat Linux 7.3
FTP, remsh, rlogin commands are working from HP to Linux.
But rcp (Remote copy) command is not working and the following message displayed

rcmd: connect: xyzsys.com: (FQDN) Connection refused

Can anyone help me out ?
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: RCP to Linux box from HP Box

Most likely the .rhosts files aren't compatbile.

They need to let each other in by hostname or ip addresss

.rhosts

jufdev root
jufprod root


This lets the root user run the r commands back and forth.

Pushy as I am, if you want real secure functionality you should have openssh on the linux box and HP secure shell on the UX box

https://payment.ecommerce.hp.com/cgi-bin/swdepot_parser.cgi/cgi/try.pl?productNumber=T1471AA&date=

Then you can generate and exchange public keys and have secure scp(replaces rcp) sftp(replaces ftp) ssh(replaces telnet) functionality.

I've attached a cookbook.

P
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ravi Yarlagadda
Occasional Advisor

Re: RCP to Linux box from HP Box

I defined host name,FQDN in .rhosts and /etc/hosts.equiv files.
RCP is working fine from Linux box to HPUX and not working from HPUX to Linux.
These both boxes are internal network. We need to transfer data recrusive directories for every day.
Which is the simple command to transfer a file on trusted servers with out password and not using NFS ?
Shannon Petry
Honored Contributor

Re: RCP to Linux box from HP Box

If you look at /etc/pamd.d you will find the security control files for all of these types of access. You may have the /etc/hosts.equiv and $HOME/.rhosts correct, but by default rexec is not allowed. Modify the /etc/pam.d/rexec to allow foreign access.

WARNING: This is very insecure, hence initially disabled. Enable at your own risk and understand that it allows for easy attacks by anyone with access to the network.

Regards,
Shannon
Microsoft. When do you want a virus today?
Ravi Yarlagadda
Occasional Advisor

Re: RCP to Linux box from HP Box

I commented the following commands in rlogin,rexec,rsh file and still rcp is not working.

#auth required /lib/security/pam_nologin.so
#auth required /lib/security/pam_securetty.so

What other commands needs to comment ?
Shannon Petry
Honored Contributor

Re: RCP to Linux box from HP Box

You can not just comment out these lines, or the system defaults are used. Read the man pages for pam.conf for more information.

What you need to do is use "optional". Like so...

# cat /etc/pam.d/rexec
#%PAM-1.0
# For root login to succeed here with pam_securetty, "rexec" must be
# listed in /etc/securetty.
auth optional /lib/security/pam_nologin.so
auth optional /lib/security/pam_securetty.so
auth optional /lib/security/pam_env.so
auth optional /lib/security/pam_stack.so service=system-auth
account optional /lib/security/pam_stack.so service=system-auth
session optional /lib/security/pam_stack.so service=system-auth


Regards,

Shannon
Microsoft. When do you want a virus today?