title: SSH SCP Local file to Remote in Terminal Mac Os X
body: <p>I am attempting to copy a local file 'magento.tar.gz' from my local machine to a remote server using SSH through a VPN. This is connecting to the Virtual Machine's Internal IP which I've used as xx.x.x.xx here.</p>
  
  <p>I have full 'sudo' access on the SSH account so there shouldn't be any problem copying across. I have tried the following:</p>
  
  <p>I have tried the following (the magento.tar.gz file is already in the local root dir)</p>
  
  <pre><code>sudo scp magento.tar.gz user@xx.x.x.xx/var/www/
  </code></pre>
  
  <p>This asks me to type in my local password. Afterwards returns <code>cp: user@xx.x.x.xx/var/www: Not a directory</code></p>
  
  <pre><code>sudo scp /Users/myname/magento.tar.gz user@xx.x.x.xx/var/www/
  </code></pre>
  
  <p>Returns the same.</p>
  
  <p>Do I need to include a SSH in there anywhere?</p>
  
  <p>Do I need to connect via SSH to the site first?</p>
  
  <p>Side note: I've managed to connect via SSH to the server, browse to the directory and make a folder and delete it using <code>sudo mkdir</code> etc so I definitely have permissions.</p>