LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Problem with rcp (http://www.linuxquestions.org/questions/linux-networking-3/problem-with-rcp-4175434974/)

a2326 10-31-2012 05:41 PM

Problem with rcp
 
Hello,
I tried to copy a file from host A (Mac OS X) to host B (Lubuntu 12.10), but it didn't work and I received a "connection refused" message.
Anyway, i can ping host A from host B and vice versa and on host B isn't a firewall. I also allowed all hosts in the .rhosts file.
Any ideas what could be wrong here?

ar2deetu 10-31-2012 06:10 PM

Can you provide the execution that you typed in the terminal? (alter the user names and other information)

a2326 10-31-2012 06:30 PM

Code:

file="/shell_scripts/local/testdat.txt"

if rcp "$file" 192.168.0.100:/tmp/var; then
  echo "Success"
else
  echo "Error" 1>&2
  exit 1
fi

The file exists and the remote server is reachable. However, the host name of the destination host can't be resolved, e.g. "ping 192.168.0.100" works, but not "ping ubuntu_host". Seems to be a DNS problem.

On the ubuntu_host, I can ping google.com and also the router without problems.

Here are my IPv4 network setting on "ubuntu_host":
- address: 192.168.0.100
- subnet: 255.255.255.0
- gateway: 192.168.0.1
- DNS server: 192.168.0.1

Also the resolv.conf has the correct entry: nameserver 192.168.0.1

The -L option from iptables says this:
Chain INPUT (policy ACCEPT)
target propt opt source destination

Chain FORWARD (policy ACCEPT)
target propt opt source destination

Chain OUTPUT (policy ACCEPT)
target propt opt source destination

Reuti 11-01-2012 04:02 PM

a) if you have no DNS server running on your own or registered a domain you have to specify either the TCP/IP address or the name you specifies in /etc/hosts on the source machine, i.e. the Mac.

b) Is rcpd running on the Lubuntu machine, i.e. the server application on the receiving side? As these protocols are deprecated, you can use scp to transfer the files. To test this: can you transfer files on the Lubuntu machine on its own i.e.
Code:

$ rcp file localhost:
But better would be to use:
Code:

$ scp file localhost:

a2326 11-01-2012 06:06 PM

I know that rcp is a bad choice, but it's a prerequisite. rcp doesn't work locally and I can't find a running rcpd service in the process tree.
Does it make sense to use rcp in conjunction with xinetd?


All times are GMT -5. The time now is 05:58 AM.