Huntress CTF: I Can’t SSH
I’ve got this private key… but why can’t I SSH?
In the challenge, players were given an id_rsa
file, however, they were unable to SSH into the server using that.
Firstly, I tried to SSH into the server by using the given private key:
However, the server responded with the following error:
Upon doing a bit of research, I landed upon a StackOverflow post which suggested that the error was due to a new line character at the end of the private key file.
To fix this, I simply removed the new line character from the end of the private key file by using nano text editor.
I then tried to SSH into the server again and it worked! All I had to do was cat the flag.txt
file in the spawn directory to get the flag.