title: Chef: deploy a server with root ssh access disabled?
body: <p>When we provision new linux servers, we </p>
  
  <ul>
  <li>create a new user with sudo rights, and...</li>
  <li>block root from ssh access</li>
  </ul>
  
  <p>And then we proceed to configure the system via the new user account.  Of course we do it this way because our logs are full of hostile ssh root login attempts.</p>
  
  <p>But now we're trying to use Chef (chef solo with knife-solo and librarian-chef) to build servers.  Once we create a recipe that blocks ssh login from root, we can't run the recipes again.</p>
  
  <p>I have seen this:
  <a href="https://stackoverflow.com/questions/20461686/how-to-run-chef-client-vagrant-provisioner-from-custom-non-root-user?rq=1">How to run chef-client vagrant provisioner from custom non-root user?</a>
  but it seems like "root" is hardcoded all over the place and the accepted solution would require branching all the basic cookbooks.</p>
  
  <p>Any ideas on how to create a re-runnable Chef setup that includes disabling root ssh access ?</p>