Over the Wire - Bandit - Level 1-2

Bandit Level 1- Level 2

bandit level 1-2

Goal: get the password for next level
Given Info:-
stored file: '-' located in home directory

bandit level 1-2
Here first you need to enter the level 1 by using the password we got in previous level. for that we use the following command

ssh bandit1@bandit.labs.overthewire.org -p 2220

then the terminal ask for your password then give the password we got in previous level.(As shown in the above pic)

Now list the files in the current directory using ls command
bandit level 1-2
Here you can see the file named '-' open it using cat command
bandit level 1-2
here we used the command cat ./-
A file name starting with an hyphen(-) cant read by the cat command instead we need to use ./ in the starting of the file name.
Now we got the password for next level