Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I thought I could easily copy a tgz from a linux box to a windows box (cygwin) by doing this on the linux box:

nc -vv -l 4444 < file.tgz

And this on the windows box:

nc -vv 10.13.13.2 4444 > file.tgz

But whenever I do that the windows box complains:

10.13.13.2: inverse host lookup failed:  : Operation not permitted
(UNKNOWN) [10.13.13.2] 4444 (?) : Connection timed out

What am I doing wrong?

share|improve this question
up vote 3 down vote accepted

It's usually that the socket has been closed already. Try this on the linux one (first):

nc -l -p 4444 -w5 < file.tgz

Then this on the windows box (wihin 5 seconds of the first):

nc -w5 10.13.13.2 4444 > file.tgz

The -w argument sets a timeout on the connection (5 seconds, in this case). Also, -l sets up listen mode, but you need to specify the listen port with -p.

share|improve this answer

Uh, what exactly are you trying to do? Transfer a file from a Linux box to a Windows box?

I always use WinSCP. It connects to the Linux box's sshd and transfers files over SFTP.

share|improve this answer
1  
Not all boxes run an sshd, as was the case when I asked this question. – dsummersl Jun 13 at 12:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.