Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

How to login ssh without a password using the ssh host key?

Writer Sophia Terry

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

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.

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.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy