ReplaceKeys is used by the authentication worker to write ssh keys to ~/.ssh/authorized_keys. It merges existing keys with those added to Juju. It checks that all keys to be written have comments, but existing keys may not have comments. The check for key comment is done as any keys are added to Juju so the check in ReplaceKeys can be removed.