title: Download file to local computer via SCP while ssh connection to remote computer
body: <p>I keep getting an error when trying to download a file from a remote computer when connected via SSH. </p>
  
  <p>I'm using a Mac and connecting via terminal. </p>
  
  <p>I type the following:</p>
  
  <pre><code>scp username@host : /path/to/hosts/file/host_file.txt ~/desktop
  </code></pre>
  
  <p>I then enter my password and get the following error:</p>
  
  <pre><code>scp: .: not a regular file
  cp: cannot create regular file '/host_file.txt': permission denied
  /directory/user/desktop: no such file or directory
  </code></pre>
  
  <p>Any help?</p>
  
  <p>It appears to be trying to save it to a directory on the remote system but I'm not sure.</p>
  
  <p>**update:</p>
  
  <p>I removed space on either side of the : 
  It now appears to download but I don't see anything on my desktop.</p>
  
  <p>Thanks for all your help. </p>