Operating System - HP-UX
1820087 Members
2702 Online
109608 Solutions
New Discussion юеВ

Activating rcp or rsync ports

 
Chern Jian Leaw
Regular Advisor

Activating rcp or rsync ports

HI ,

Is there a way to check if a port for a particular network service i.e rcp, rsync, rsh, rlogin, etc ?

I tried performing a rsync task between 2 machines, and I obtain the error message below:
On host1:
rsync -avz test.cc host2.willow.com:/home/cs/kenny
Permission denied
unexpected EOF in read_timeout

However, when I invoked rsync from host2 to copy the file to host1 and it worked:
On host2:
rsync -avz myfile.cc host1.pdx.willow.com:/home/cs-pg/ken
building file list ...done
myfile.cc
wrote 113 bytes read 36 bytes 42.57 bytes/sec
total size is 10 speedup is 0.07

I've included the host and user name entries on both .rhost files on both machines in the home directories, and not in /.

host1 and host2 are on 2 separate NIS domains.

I get the same kind of error when I tried copying files with rcp.

As for rsh:
On host1:
rsh host2..willow.com
Password:
it prompted for a password even though host1 and host2 have been made to trust each other.

Could anyone please show me how I could open up the port on host2 to accept incoming data from host1?

Could anyone please help me out on this matter?

Thanks.
4 REPLIES 4
harry d brown jr
Honored Contributor

Re: Activating rcp or rsync ports


you have something wrong somewhere.

What's the OS's???

Compare your

/etc/services

files.

Put + + in the first line of .rhosts just to test the proper routing and account login. Then of course delete it after your test.


Also, lsof, is a great tool to view what a process has open, but I don't see much of a use here.

http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.64/

live free or die
harry
Live Free or Die
Chern Jian Leaw
Regular Advisor

Re: Activating rcp or rsync ports

harry,

I tried placing + + entry into both the .rhosts file:
On host2:
#cat .rhosts
+ +
host1.pdx.willow.com ken

On host1:
# cat .rhosts
+ +
hosts2.willow.com ken

This method does not seem to work.
Could you please tell me where did I go wrong?

I was wondering if you could provide an example on how I could use lsof to check if the rsync port is open on both host machines?

Thanks
Chern Jian Leaw
Regular Advisor

Re: Activating rcp or rsync ports

harry,

The /etc/services file on both host1 and host2 have had their rsync ports enabled i.e

On host1:
#cat /etc/services
rsync 873/tcp
rsync 873/udp

On host2:
#cat /etc/services
rsync 873/tcp
rsync 873/udp

I did not have rcp or rsh port enabled on both host1 and host2 in the /etc/services. However, even without the rsh or rcp ports enabled, I'm able to invoke rsync on other machines, except host1 and host2.

I invoked rsync on HPUX B-11 machines.

Thanks.
Patrick Graham
Occasional Advisor

Re: Activating rcp or rsync ports

Are you by chance trying the transfer as root? Look at your host1 system's sshd_config file. I experienced the same problem you are describing and I commented out the "PermitRootLogin" line to enable root to perform the rsync operation. Good Luck!