Description of problem: If a cluster is installed with SSH keys, machineconfigs `99-worker-ssh` and `99-master-ssh` are created to configure the SSH keys. However, if these machineconfigs are deleted afterwards, ssh key is not removed from authorized_keys file of core user. Version-Release number of selected component (if applicable): 4.5 How reproducible: Always Steps to Reproduce: 1. Install a cluster with SSH keys 2. Delete 99-worker-ssh machineconfig 3. Try to ssh with core user Actual results: ssh possible Expected results: ssh not possible due to access denied Additional info: A new rendered config is created correctly, all the nodes properly update to it and the new rendered config doesn't have any keys information. So it is presumable that the issue is in machine-config-daemon, as I don't see either an error message there or an indication of keys being updated.
Hi, Creating a machineconfig with `passwd` section like this seems to workaround the issue in my test cluster: ``` passwd: users: - name: core sshAuthorizedKeys: [] ```
Verified on 4.8.0-0.nightly-2021-02-10-155958
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:2438