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'm currently trying to get a file on my school account from home on my mac using SSH. I have the hostname and I can get in just fine, but transferring files is like smashing my head into a wall over and over again. It appears I need to use scp. From Website One and WebsiteTwo. So far, in SSH in my terminal I have such;

~/assign$1 scp Username@Hostname:/home/burj1620/assign/a3.submit /Users/me/Development/Assignments1620/Assignment3

However I get the following error;

/Users/me/Development/Assignments1620/Assignment3: No such file or directory

After checking my spelling over and over again I tried just using /Desktop as the second location. This, however, just copied the a3.submit file from it's current directory to the desktop, not to my computer at home. Is there something obvious I'm missing? It seems rather easy but it just doesn't work.


share|improve this question

migrated from Oct 3 '12 at 20:18

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

Does the Assignment3 directory already exist? scp won't make it for you if it does not exist. Actually, I'm confused about your second comment that says "to the desktop, not to my computer at home". Which desktop? You might want to clarify which direction you want to transfer the file, which is your home machine, which is the remote machine, and which one you're typing commands into. – Greg Hewgill Oct 3 '12 at 1:31
up vote 1 down vote accepted

You need to run scp on your computer at home.

So basically the concept is as follows:

scp <user>@<remote_host>:/path/to/file/on/remote/computer /local/path/on/your/computer/file

If you're executing that command AFTER you logged in to the remote machine via SSH and you use remote machine in your command as remote_host, effectively you're just copying it around on the same box.

Also, on your mac, you can use Tab key, to complete path names. Just type a few starting letters and hit Tab key. Will save you checking for spelling. Completion will stop when multiple alternatives are found, double-Tab will show you alternatives, add enough letters to the word to make it unique and press Tab again.

share|improve this answer
Thank you, no more head smashing. – user1209379 Oct 3 '12 at 1:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.