In #7105, code to check if an SSH public key file exists were added to generate_ssh_keys in src/azure-cli-core/azure/cli/core/keys.py. However, the callers of this function essentially make this check. So we should update them and remove these checks.
See:
-
_generate_ssh_keys() in src/command_modules/azure-cli-batchai/azure/cli/command_modules/batchai/custom.py
-
validate_ssh_key() in src/command_modules/azure-cli-acs/azure/cli/command_modules/acs/_validators.py
-
validate_ssh_key() in src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_validators.py
Environment summary
N/A