I am trying to practice ethical hacking in my own lab. I have got limited shell in a fedora box in addition I am able to read root files like /etc/shadow trough another vulnerability.
Now, I need to get the box rooted, I tried to crack the root hash in /etc/shadow but no luck. I though of getting in using ssh keys.
I managed to get the content of /root/.ssh/authorized_keys and thought that I can use it to authenticate without a password. however, when I issued the following command :
root@kali:~/Desktop# ssh -o BatchMode=yes -i ~/Desktop/x.pem [email protected]
Permission denied (publickey,gssapi-with-mic,password).
I get the error above -where x.pem is just a file i used to save a copy of the key found in authorized_keys as it is on the victim machine. any idea what is the problem? or another suggested way to get a root privileges ?