If the config block already exists, replace it instead of removing it and appending. Since the order in SSH configs matter, moving the config to the bottom can cause issues.