SSH without a password!

I just learned that you can actually SSH to a host without a password if you have the right key.

Normally, if you want to ssh to a host, you do like,

#ssh  bandit14@bandit.labs.overthewire.org

It then asks for a password. But if you don’t know it but somehow managed to get the ssh key, you can login to that host without password.

simply refer to that key with -i <key>

#ssh bandit14@bandit.labs.overthewire.org -i sshkey.private
bandit5

Background:

Bandit level 13 doesn’t provide a password for the next level, rather gives you an SSH key, which should be used to SSH to level 14.

So, SSH to bandit13 first if you didn’t already.

#ssh bandit13@bandit.labs.overthewire.org

password is: 8ZjyCRiBWFYkneahHwxCv3wb2a1ORpYL

then you are supposed to do like,
#ssh bandit14@bandit.labs.overthewire.org -i sshkey.private

For some reason you can’t do that (they gave a hint about this in the description). But as you are already logged on to bandit.labs.overthewire.org, you can use localhost instead.

#ssh bandit14@localhost -i sshkey.private

And you should be logged in no time.
By the way, I am loving Bandit.😀

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s