We learned the password with the hydra. Now we can login.
After logging in, we are given john's ssh key.
Download the key with wget
The key is decrypted with the following command. And Passphrase is obtained.
Now we can login
We get user flag.
Now that we can run the cat command with sudo, we can print the shadow file and crack the root password.
Actually, we do not need to obtain the root password to print the root.txt flag at this stage. Sudo cat /root/root.txt is enough, but the machine asks us for the root password. So we will crack the root password.
Let's copy all the hashes to the local machine and break them with hashcat.