The password for the next level is stored in a file called - located in the home directory.

Here are the details which we have from the previous level:

  • Host: bandit.labs.overthewire.org
  • Port: 2220
  • Username: bandit1
  • Password: ZjLjTmM6FvvyRnrb2rfNWOZOTa6ip5If

So, The SSH syntax will be:

sshpass -p ZjLjTmM6FvvyRnrb2rfNWOZOTa6ip5If ssh [email protected] -p 2220

In Bash, this - symbol has a special meaning. If you try to use cat -, it won’t read the content of a file named -. Instead, it will start waiting for input and then return the same input as output. To read the content of a file named -, you can use the full path or escape the - symbol. Here are some ways to achieve this:

  • Using the full path:

    cat /home/bandit1/-
    
  • Using the relative path:

    cat ./-
    
  • Escaping the - symbol:

    cat ./\-