title: SFTP to send file with bash script
body: <p>I'm using key authentication, so password is not an issue.  I have a file whose name I know and I simply want to send it to another machine over sftp.</p>
  
  <p>I tried searching but couldn't find this (seemingly simple) question anywhere.  Perhaps my Google-fu is simply failing me today.</p>
  
  <p>In short: I'm on my local machine, want to send a file (test.txt) to a remote machine.  Authorized keys are already provided.  Basically I want to automate these three steps:</p>
  
  <pre><code>sftp root@remote:/root/dropoff
  put test.txt
  quit
  </code></pre>
  
  <p>Is there a simple bash command I can use to automate this?  The only option I've seen is using a bash script to perform the put/quit and using the -b option to run it.  Is there anything cleaner than that?  (I'm not interested in using any other applications/tools.)</p>
  
  <p>Thanks!</p>