Solved sshd initialization

Greetings all,

I have deleted all the ssh_host_* keys and generated my own ssh_host_ed25519_key, ssh_host_ed25519_key.pub, ssh_host_rsa_key, and ssh_host_rsa_key.pub. However, upon restarting the computer, the sshd(8) re-generated the deleted keys ssh_host_ecdsa_key and ssh_host_ecdsa_key.pub. I have reviewed the relevant man pages, but cannot find how to prevent this from happening.

Any advise would be appreciated.

Kindest regards,
M
 
I'm taking a stab in the dark here, but just by looking at the rc file I think you can just put

sshd_dsa_enable = NO

into rc.conf and have it do what you want to do?
 
Hi msplsh,

thank you, that was it. Turned out that I was looking at the wrong man pages. First I looked at rc.conf(8), which led me to believe that I can use some flags based on the section sshd_flags, so I looked at sshd(8).

Kindest regards,

M
 
It can get confusing as to who does what, but the "upon reboot" regeneration made me think of what happens on new installs which seemed like it would be controlled by init. Glad you got it figured out.
 
Back
Top