I found out what the problem was. It turns out that ssh did not like the permission/mode of the directory in which the .ssh folder was. So, guys be careful.
I am having trouble loging to my pi via ssh using keys. I copied the keys with ssh-copy-id and they are present in authorized_keys file, but still it accepts only password login. Here is the verbose output of the ssh client: OpenSSH_6.0p1 Debian-3ubuntu1, OpenSSL 1.0.1c 10 May 2012 debug1: Reading c...