Bandit level 13

Level Goal

The password for the next level is stored in /etc/bandit_pass/bandit14 and can only be read by user bandit14. For this level, you don’t get the next password, but you get a private SSH key that can be used to log into the next level. Note: localhost is a hostname that refers to the machine you are working on

To solve this riddle we need to take a closer look at the ssh command. As we are provided with a ssh key. My best tip here is to look at he man pages of the ssh and figure out how to use a ssh keyfile.

Useful commands:

  • ls
  • ssh
  • pwd
  • cat
  • cd

Solution - Spoiler Alert!

if we first use ls command we can see that we have a file named 'sshkey.private' which we can use to log in to bandit14. With the command ssh -p 2220 -i sshkey.private bandit14@localhost we will be logged in as bandit14. then we simply need to cat /etc/bandit_pass/bandit14 and we will have the password.

Overview
Bandit level 12
Bandit level 14