title: Automatic machine to machine authentication best practice?
body: <p>I'm trying to find the best idea/practice for my login protocol and I'd like to pick your brains.
  I have one server and a few remote computers that are talking to the server using API (RESTful APIs if it matters) we'll call them &quot;units&quot;.
  Now I want the units to be able to authenticate to the server and start reporting some data.
  Last thing is I want the process to be somewhat automatic, somewhat meaning there will be a one time setup when the unit is installed and from there and on the authentication will be automatic without requiring human interference.</p>
  <p>My main security concern is I don't want anyone to be able to report data as one of the units, so I want the unit's identifier to be only known to the unit and the server.</p>
  <p>What would be to best way to do something like this? I'm not sure my question is clear enough so please ask me to elaborate on anything I've missed.</p>
  <p>P.S.
  All the backend/server code is in NodeJS.</p>