Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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 recently setup a server to host my "data" movies and music and such.

I was trying to copy the data back to my home computer using this command

scp files/on/server user@homecomputer:/home

the response was unknown user@computer, then i replaced with the ip address still same difference. How can i fix this?

Please and thank you.

share|improve this question
Can you show the actual commands you typed? – ℝaphink Aug 28 '10 at 16:19
Irrelevant to this question - but I'm a big advocate of rsync – Marco Ceppi Aug 28 '10 at 16:55
Are you typing this on the server?. Have your home computer a ssh demon enabled?. – Javier Rivera Aug 30 '10 at 15:41
up vote 1 down vote accepted

It's very unlikely that you have write access to /home (you'll need to specify something like /home/user instead).

share|improve this answer

Could you post the exact error message? Perhaps the user-name on your home computer is another one?

share|improve this answer
This is really a comment, not an answer to the question. Please use "add comment" to leave feedback for the author. – stephenmyall Aug 17 '12 at 23:26
@StephenMyall, well, we don't want to be more catholic than the pope - when the question contains so limited information, you can only provide an educated guess in your answer. Which the second sentence is. It is a possible answer to the problem. You could even delete the 2nd question mark. – maxschlepzig Aug 19 '12 at 16:53

I can't give a definitive answer without knowing your network organization (which you should have described more precisely), but here's some information that may help you.

You mention a “PC on the same network”, but also a “home computer”. Is your “home computer” really on the same network as the server? If not, maybe the home computer is behind a firewall and you can't initiate a connection from the server to the home computer, only from the home computer to the server. In particular, if the home computer is behind a NAT and the server is outside the NATed area, the server simply can't see the home computer.

Other answers have noted potential problems with your command. If you had cut and pasted the exact error message (which you should have done), it would have been possible to tell whether these potential problems were actual problems.

In any case, reverse ssh connections (i.e. ssh from home to server then back from server to home) are hard to manage (potential firewall trouble, potential authentication trouble, need to run an ssh server locally). So instead of initiating the copy from the server, initiate it from the home computer.

Furthermore, scp is not a particularly good tool to copy a large number of files. If you want to make a one-time copy, or if you're always going to copy files from the server to the home computer and never the other way round, use rsync. If you want to keep the two computers synchronized, use unison — it's easier to use and less error-prone than rsync for two-way synchronization.

share|improve this answer

Do you have the openssh-server package installed on the second computer? If not, install it; that should make it possible to connect with ssh/scp/sftp to the second computer?

share|improve this answer

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.