Trying to set up SSH with shared key, but the server is not recognizing the device's key I'm running an Amazon Fire HD 7 first gen, with cyanogenmod 11 on it. Here are my system settings since they're required on Reddit:

http://i.imgur.com/thFqLFa.png

I'm trying to set up ssh with shared key on Cyanogenmod. Normally, it's very easy to connect to my server, but I'm having difficulty setting this up.

I did

ssh-keygen -t rsa -b 4096


on my kindle as root, because the user didn't have access to the folders (why is this, by the way? why can't the user even see the data folder?). I put the key in the default folder with the default file name, which was /data/.ssh/id_rsa. Then I copied id_rsa.pub over to the 'authorized_keys' file on my server, where all the other keys that work are. I restarted the ssh server, but it keeps telling me the public key failed. I ran ssh with the -vv option, and it tells me the same thing, that the keys are not matching.

What do I need to do get the server to recognize the key?
I did more digging, and it looks like this has been a pretty typical problem throughout the versions of cyanogenmod. Not sure if it's a bug or I just lack understanding of the problem.

I was able to connect using ssh -i and specifying the address of the key. When I had set the -v flag, it checked the key I was using and said it didn't match. So I'm thinking at best ssh ships so it's not set up correctly, and at worst, something is broken. 

I made an alias so that I don't have to type out -i then the address then the other options I want then the user and host name every time I want to connect to my home server.