title: Connecting to a remote Centos server using SSH Keys
body: <p>I am trying to connect to a Centos 6.3 Server using an SSH Key so I can run a script remotely without it asking for a password everytime. I have followed the following instructions:</p>
  
  <ol>
  <li>Login to the server using the normal ssh command and password one time so the server adds your computer to the known hosts</li>
  <li>In your computer using cygwin-terminal generate the keys and leave the passphrase blank:<code>ssh-keygen -t rsa</code></li>
  <li>Now set permissions on your private key and ssh folder:<code>chmod 700 ~/.ssh &amp; chmod 600 ~/.ssh/id_rsa</code></li>
  <li>Copy the public key (id_rsa.pub) to the server, login to the server and add the public key to the authorized_keys list: <code>cat id_rsa.pub &gt;&gt; ~/.ssh/authorized_keys</code></li>
  <li>Once you've imported the public key, you can delete it from the server. Set file permissions on the server: <code>chmod 700 ~/.ssh &amp; chmod 600 ~/.ssh/authorized_keys</code></li>
  <li>Retart the ssh daemon on the server: <code>service sshd restart</code></li>
  <li>Test the connection from your computer:<code>ssh root@198.61.220.107</code></li>
  </ol>
  
  <p>But when I try to ssh to the remote server it is still asking me for the password. The .ssh folder was not created on the server so I had to created myself. Any ideas of what might be happening? did I miss something? Is there another way to set up the keys?</p>