Different HostKeys for different hostnames or IPs in the same sshd?..

Darren Tucker dtucker at zip.com.au
Wed Sep 21 12:20:31 EST 2011


On Wed, Sep 21, 2011 at 10:21 AM, Peter Stuge <peter at stuge.se> wrote:
> Mikhail T. wrote:
>> If not, can sshd offer a different key depending on the IP-address,
>> that the incoming connection uses?
>
> In theory sure, in practise OpenSSH can't. You could always patch it.

If by "IP-address that the incoming connection uses" you mean "address
that you connect *to*" then you can run two separate sshds with
distinct configs (setting at least ListenAddress and HostKey to
different values).

If you mean "address that you connect *from*" then no it currently
can't.  It could probably be added to Match (but I'm struggling to see
a sensible use case for it).

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.


More information about the openssh-unix-dev mailing list