title: setting SSH access to localhost
body: <p>I am trying to setup ssh access to my own local machine.</p>
  
  <p>I have created the id_rsa key using ssh-keygen. 
  I added id_rsa.pub to authroized_keys in .ssh/
  I made sure the permission of authorized_keys is 640
  I enabled public-key authentication in sshd_config &amp; restarted ssh</p>
  
  <blockquote>
    <p>RSAAuthentication yes</p>
    
    <p>PubkeyAuthentication yes</p>
    
    <p>AuthorizedKeysFile  %u/.ssh/authorized_keys</p>
  </blockquote>
  
  <p>However I am unable to login to ssh.</p>
  
  <p>The error I recieved is as follows</p>
  
  <pre><code>debug3: load_hostkeys: loaded 1 keys
  debug1: Host 'localhost' is known and matches the ECDSA host key.
  debug1: Found key in /home/rahul/.ssh/known_hosts:6
  debug1: ssh_ecdsa_verify: signature correct
  debug2: kex_derive_keys
  debug2: set_newkeys: mode 1
  debug1: SSH2_MSG_NEWKEYS sent
  debug1: expecting SSH2_MSG_NEWKEYS
  debug2: set_newkeys: mode 0
  debug1: SSH2_MSG_NEWKEYS received
  debug1: Roaming not allowed by server
  debug1: SSH2_MSG_SERVICE_REQUEST sent
  debug2: service_accept: ssh-userauth
  debug2: key: /home/rahul/.ssh/id_rsa (0x7fa12de58e70),
  debug2: key: /home/rahul/.ssh/gitHubKey ((nil)), explicit
  debug2: key: /home/rahul/.ssh/id_rsa_buhlServer (0x7fa12de59060), explicit
  debug1: Authentications that can continue: publickey
  debug3: start over, passed a different list publickey
  debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
  debug3: authmethod_lookup publickey
  debug3: remaining preferred: keyboard-interactive,password
  debug3: authmethod_is_enabled publickey
  debug1: Next authentication method: publickey
  debug1: Offering RSA public key: /home/rahul/.ssh/id_rsa
  debug3: send_pubkey_test
  debug2: we sent a publickey packet, wait for reply
  debug1: Authentications that can continue: publickey
  debug1: Trying private key: /home/rahul/.ssh/gitHubKey
  no such identity: /home/rahul/.ssh/gitHubKey: No such file or directory
  debug1: Offering RSA public key: /home/rahul/.ssh/id_rsa_buhlServer
  debug3: send_pubkey_test
  debug2: we sent a publickey packet, wait for reply
  debug1: Authentications that can continue: publickey
  debug2: we did not send a packet, disable method
  debug1: No more authentication methods to try.
  Permission denied (publickey).
  </code></pre>