2

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.

3
  • 1
    Can you show the actual commands you typed?
    – raphink
    Aug 28, 2010 at 16:19
  • 1
    Irrelevant to this question - but I'm a big advocate of rsync Aug 28, 2010 at 16:55
  • Are you typing this on the server?. Have your home computer a ssh demon enabled?. Aug 30, 2010 at 15:41

4 Answers 4

1

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

0

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

2
  • This is really a comment, not an answer to the question. Please use "add comment" to leave feedback for the author. Aug 17, 2012 at 23:26
  • 2
    @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. Aug 19, 2012 at 16:53
0

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.

0

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?

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .