Trying to pass Bandit level 27 on OvertheWire.org. Git clone not working

2k Views Asked by At

I've been working my way through bandit on OverTheWire, and I'm stuck on Level 27. The instructions for this level are as follows: "There is a git repository at ssh://bandit27-git@localhost/home/bandit27-git/repo. The password for the user bandit27-git is the same as for the user bandit27.

Clone the repository and find the password for the next level."

I've created a temp directory, and I'm running the git clone command, followed by the address of the repository from the temp directory. Here's a screenshot of what is happening when I run the command. From what I understand, I should be asked for a password, but I'm not prompted for a password, and am given the message "permission denied (publickey). fatal: could not read from remote repository. Please make sure you have the correct access rights, and the repository exists.

Can anyone provide insight on what I might be doing wrong?

So far I've tried changing the port that I connect to, which didn't work. I have also tried generating a ssh key, but I can't seem to find a /.ssh directory to copy it to. I'm a complete noob, so I'm probably doing something wrong there.

3

There are 3 best solutions below

1
On

git clone ssh://bandit27-git@localhost:2220/home/bandit27-git/repo worked for me as was stated above. I also had some trouble with the syntax to set the port to 2220... (i did a -p 2220, im fairly new to this stuff so lucky someone told the right way to do it :) )

1
On

just add the port 2220

as in

ssh://bandit27-git@localhost:2220/home/bandit27-git/repo

1
On

You need to specify the port:

git clone ssh://bandit27-git@localhost:2220/home/bandit27-git/repo