Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 4444 > file.tgz

But whenever I do that the windows box complains: inverse host lookup failed:  : Operation not permitted
(UNKNOWN) [] 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 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
Not all boxes run an sshd, as was the case when I asked this question. – dsummersl Jun 13 at 12:21

Your Answer


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.