I have set an encrypted LVM partition on my personnal server (Debian Jessie). So everytime I need to reboot it, I have to connect to dropbear which is installed in initramfs, unlock the disk, close connection and then, once the server has started, connect to the OpenSSH server.

The problem is that both server have different private/public key pair but the same IP address, and so my ssh client complain that the fingerprint saved in ~/.ssh/known_hosts differs from the one sent by the server.

Question 1 :

Is there a way to use the same private/public key pair in dropbear and OpenSSH server ? or Am I stuck using workaround like :

  • using 2 different IPs for boot and up time.
  • using 2 different ssh client for boot and up time...

Question 2 :

If it is possible to use the same key, how do I do that ? it seems that dropbears private keys are in a format that differs from OpenSSH, and seem to be encrypted, how do I convert them ?


If you would use the same key for both, you would have to leave them on unencrypted partition (initramfs as you describe) and this is not what you want, since private keys are sensitive data.

I would rather propose you to run dropbear on different port then standard 22. you can put in your known hosts file also the port number (in format [hostname]:port key-type key) so you will avoid the fingerprint warnings.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.