1

The general idea I've been finding on this is that if you remove the HostKey line which corresponds to a specific key, the key will stop being generated. For whatever reason though, my sshd_config only lists one HostKey at /etc/ssh/ssh_host_rsa_key, and every time I delete the extra keys and restart sshd, it regenerates both the ssh_host_dsa_key and ssh_host_key files. Aside from digging through source and recompiling OpenSSH myself, is there any way to enforce that it not create a specific host key?

Running OpenSSH 6.1p1-4.fc18 on Fedora 18 x86_64 if it makes a difference.

0

1 Answer 1

2

You can edit the /etc/sysconfig/sshd file and change the AUTOCREATE_SERVER_KEYS variable:

AUTOCREATE_SERVER_KEYS=NO

or

AUTOCREATE_SERVER_KEYS=RSAONLY

Also ensure that you only have Protocol 2 in /etc/ssh/sshd_config.

1
  • Thanks! Good to know there's another file I can configure.
    – Amazingant
    Jan 18, 2013 at 18:39

You must log in to answer this question.

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