Azure / WALinuxAgent

Microsoft Azure Linux Guest Agent

Home Page:http://azure.microsoft.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Host certificate file suddenly removed

baelter opened this issue · comments

Something causes the agent to remove our host cert.

ls /etc/ssh/
...
-rw-r--r--   1 root root    534 Oct 21 12:22 ssh_host_ed25519_key-cert.pub

That file is suddenly gone.

Ubuntu 20.x
waagent 2.8.x

Can send waagent.log privately, but I can't see anything interesting that looks related.

This pattern would match the key

def get_ssh_key_glob(conf=__conf__):
return os.path.join(get_ssh_dir(conf), 'ssh_host_*key*')

Used in these places https://github.com/Azure/WALinuxAgent/search?q=get_ssh_key_glob

Deleted here:

fileutil.rm_files(conf.get_ssh_key_glob())

But we have Provisioning.RegenerateSshHostKeyPair=n is the config 🤔

Turns out that cloud-init regenerates to keys for some reason