Prepare Username and Password Lists
In this step, we will create two essential files: a username list and a password list. These lists will be used by Hydra to attempt SSH logins. Creating these lists allows us to systematically test various username and password combinations against our target.
First, let's create the username list. We'll use the nano
text editor to create a file named usernames.txt
in the ~/project
directory.
nano ~/project/usernames.txt
Now, add the following usernames to the file. These are just examples; you can customize them as needed.
root
admin
test
user
ubuntu
Press Ctrl+O
to save the file, then press Enter
to confirm the filename, and finally press Ctrl+X
to exit nano
.
Next, we'll create the password list. Again, we'll use nano
to create a file named passwords.txt
in the ~/project
directory.
nano ~/project/passwords.txt
Add the following passwords to the file. Remember, these are just examples.
password
123456
qwerty
secret
ubuntu
Press Ctrl+O
to save the file, then press Enter
to confirm the filename, and finally press Ctrl+X
to exit nano
.
To verify that the files have been created correctly, you can use the cat
command to display their contents.
cat ~/project/usernames.txt
You should see the list of usernames you entered.
root
admin
test
user
ubuntu
Similarly, check the password list:
cat ~/project/passwords.txt
You should see the list of passwords you entered.
password
123456
qwerty
secret
ubuntu
These files, usernames.txt
and passwords.txt
, are now ready to be used with Hydra in the subsequent steps.