MayADevBe Blog

A Blog about Computer Science

OverTheWire Bandit Level 1 -> 2 - Walkthrough

Previous Level: Level 1


SSH: ssh -p 2220

Password: boJ9jbbUNNfktd78OOpsqOltutMc3MY1


Get the password from the file called ‘-’.

A little bit of Theory

‘-’ is a special symbol in Linux. So it is not recommended to start a file name with this symbol. ‘-’ is the standard option character. We have already seen it for adding so-called flags for specific options to a command (Like the -p flag for choosing a port for the ssh command.). standard option. Because of this, files with this symbol as the first character cannot just be referenced as other files.


First, we make sure the file is in the folder by printing all the files.

bandit1@bandit:~$ ls

Using the command cat - does not return anything. So instead of writing just - we add the path and write ./- and the command works as it should:

bandit1@bandit:~$ cat ./-

So we got the next password.

Next Level: Level 3

Share on: