title: SFTP inline put without interaction
body: <p>I am trying to automate an application deployment as part of this I need to upload a file to a server. I have created a minimal user and configured chroot for the SFTP server but I can't work out how to upload a file non interactive.</p>
  
  <p>At present I am doing <code>scp myfile buildUser@myserver.com:newBuilds/</code></p>
  
  <p>I tried <code>sftp buildUser@myserver.com myfile</code> (<code>newBuilds</code> is the chroot dir) but this didn't upload anything but it did connect.</p>
  
  <p>The reason for favouring this aproach and NOT using <code>scp</code> is that its a lot more difficult to restrict scp access (from the information I have learned).</p>