Super User is a question and answer site for computer enthusiasts and power users. 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 am trying to transfer all files from within a directory through tar as follows:

tar cz * | ssh -p 57310 tar xzv -C /home/site/www

and the error that is returned is

stdin: is not a tty
tar: includes: file changed as we read it
tar: /home/site/www: Cannot chdir: No such file or directory
tar: Error is not recoverable: exiting now

I am connecting to using ssh key.

share|improve this question

migrated from May 6 '13 at 8:46

This question came from our site for professional and enthusiast programmers.

up vote 5 down vote accepted

This works for me:

 tar cz * | ssh -p XXX account@host "cat | tar xvz -C /home/site/www"
share|improve this answer
This worked great, thanks! – user1074170 May 6 '13 at 4:28
This, by far, in my experience, is the fastest way to move files between computers that are connected over the internet. – Nerrve Mar 30 at 9:25

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.