Bandit18
Website URL: http://overthewire.org/wargames/bandit/bandit18.html
Log in to the game server using credentials of bandit17. Remember that instead of password, we got an SSH key, So let’s log into the game server using the key.
Make sure to move your SSH key to ~/.ssh directory and change the permissions of the SSH key file to 600
sudo chmod 600 ~/.ssh/<SSH key file>
ssh bandit17@bandit.labs.overthewire.org -p2220 -i<SSH key file>

Let’s have a look at the task.
There are 2 files in the homedirectory: passwords.old and passwords.new. The password for the next level is in passwords.new and is the only line that has been changed between passwords.old and passwords.new
Let’s have a look into the contents of the home directory.
ls

Now, lets find out the difference between the two files (the task says that there should be only one line that’s been changed).
vim -d passwords.new passwords.old
So, according to the task, the password is the highlighted line (red) on the left side, in passwords.new file. We have completed the task!