Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7800277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:34:59+00:00 2026-06-02T00:34:59+00:00

Using Copying by NetCat I am trying to copy files throught network by NetCat

  • 0

Using Copying by NetCat I am trying to copy files throught network by NetCat. From console it work pretty well. First I run listening netcat on the destination machine and after I run sending on source machine.

The problem is it’s doen’t work from script from the source machine:

ssh -f user@$desthost ‘nc -l 1234 | tar xvf – > /dev/null &’ #listening on destination host

tar cv /tmp/file | nc $desthost 1234 #sending to destination host

I saw that after running port 1234 is still was open and status of the socket was TIME_WAIT.

If you know what’s the problem, please, help me out.

And by the way, after copying how can I validate that the content is identical?

Thanks!

Addendum:

I found one very strange thing, the same implementation with screen on destination work works, but not stable, sometimes it doesn’t copy a file.

ssh user@$desthost screen -dm -S test ‘nc -l 1234 | tar xvf – ‘ #listening on destination host

Maybe there is an issue with timeout?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T00:35:01+00:00Added an answer on June 2, 2026 at 12:35 am

    You don’t need netcat for that:
    http://www.cyberciti.biz/faq/howto-use-tar-command-through-network-over-ssh-session/

    You just need a single ssh connection.

    Afterwards use md5sum to compare the files. It’s smart to also check the filesize first..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to copy files from one user's home directory to another user's
Using rsync, how can I rename files when copying with the --files-from argument? I
I am using putty for copying files from local machine to remote server.My folder
I'm copying a piece of text from Excel to Word using : Range(A1:C37).Copy appWD.Selection.PasteExcelTable
I'm using cp.exe from Cygwin to copy files in Windows 7. Unfortunately, when I
When copying large files using shutil.copy() , you get no indication of how the
I'm copying bug items from one tfs project to another. I'm using the copy
I am copying a file from a remote server using copy (and also tried
I'm having trouble copying a row from one table to another using sqlite3 in
How do you go about copying a cell from one table to another using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.