2

I want to login to this machine, but I just have an ssh host key, not a password.

Example from nmap:

|   1024 b6:00:e3:71:8c:a3:4e:e4:8b:9a:b5:c2:68:86:de:82 (DSA)
|_  2048 56:7b:96:50:57:7c:3d:e2:21:1d:3c:a2:24:08:58:16 (RSA).

(This key is not created by my machine, it's being picked up on an nmap scan)

So, how can I login via ssh just with that?

2 Answers 2

4

In short: You can't. A host key isn't a thing you can exploit to get into a server - it's just a cryptographic hash of the server's public key. It's public, so there's nothing to break.

SSH transmits this to clients so they can ensure they're talking to the right server.

More information here.

3

The quick answer is: you can't because host keys are for making your client sure it's talking to the box you want it to. It does not authenticate/identify you.

The other answer is: just think about it that (almost) anybody can get that host key you have already got. If it should be enough to login, then ssh would be the worst remote login solution ever. And it's not.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .