title: Unable to ssh into a newly created user on Centos on first attempt
body: <p>this is what I am doing:</p>
  
  <ol>
  <li>Creating a new server on Linode. OS is centos 6.5</li>
  <li>Logging in as root</li>
  <li>running the following script to add a user called shortfellow which does not have a password.</li>
  </ol>
  
  <p>The script is:</p>
  
  <pre><code>#!/bin/bash
  
  yum -y update
  adduser shortfellow
  
  mkdir -p /home/shortfellow/.ssh
  echo "ssh-rsa REALLYLONGSSHPUBLICKEY shortfellow@example.io" &gt;&gt; /home/shortfellow/.ssh/authorized_keys
  
  chmod -R 700 /home/shortfellow/.ssh
  chown -R shortfellow:shortfellow /home/shortfellow/.ssh
  su - shortfellow
  exit
  </code></pre>
  
  <p>The problem is that first time when I try to ssh into the system. It does not work at all. It simply asks for the password. I hit ctrl + c and try to ssh again as the same user, it works.</p>
  
  <p>this behaviour is really annoying because I am writing code to create the server programmatically and it does not work because of this silly issue.</p>
  
  <p>Does anyone have any idea why this might not be working as expected?</p>