diff --git a/src/azure-cli-core/HISTORY.rst b/src/azure-cli-core/HISTORY.rst index 7f6bb43cb32..b18b7f1b7ad 100644 --- a/src/azure-cli-core/HISTORY.rst +++ b/src/azure-cli-core/HISTORY.rst @@ -2,6 +2,7 @@ Release History =============== + 2.0.52 ++++++ * Fix bug where ids piped from a command with tsv output is improperly parsed. diff --git a/src/azure-cli-core/azure/cli/core/keys.py b/src/azure-cli-core/azure/cli/core/keys.py index d462e2d80d0..7641cc958de 100644 --- a/src/azure-cli-core/azure/cli/core/keys.py +++ b/src/azure-cli-core/azure/cli/core/keys.py @@ -60,7 +60,7 @@ def generate_ssh_keys(private_key_filepath, public_key_filepath): try: key = paramiko.RSAKey(filename=private_key_filepath) logger.warning("Private SSH key file '%s' was found in the directory: '%s'. " - "We will generate a paired public key file '%s'", + "A paired public key file '%s' will be generated.", private_key_filepath, ssh_dir, public_key_filepath) except (PasswordRequiredException, SSHException, IOError) as e: raise CLIError(e) diff --git a/src/command_modules/azure-cli-batchai/azure/cli/command_modules/batchai/custom.py b/src/command_modules/azure-cli-batchai/azure/cli/command_modules/batchai/custom.py index c70ded100da..15410b1290e 100644 --- a/src/command_modules/azure-cli-batchai/azure/cli/command_modules/batchai/custom.py +++ b/src/command_modules/azure-cli-batchai/azure/cli/command_modules/batchai/custom.py @@ -605,15 +605,9 @@ def _generate_ssh_keys(): """Generates ssh keys pair""" private_key_path = os.path.join(os.path.expanduser('~'), '.ssh', 'id_rsa') public_key_path = os.path.join(os.path.expanduser('~'), '.ssh', 'id_rsa.pub') - if os.path.exists(private_key_path) and os.path.exists(public_key_path): - logger.warning('Reusing existing ssh public key from ~/.ssh') - return - if os.path.exists(private_key_path): - logger.warning('SSH private key id_rsa exists but public key is missing. Please export the public key.') - return keys.generate_ssh_keys(private_key_path, public_key_path) - logger.warning('SSH key files id_rsa and id_rsa.pub have been generated under ~/.ssh to allow SSH access to the ' - 'nodes. If using machines without permanent storage, back up your keys to a safe location.') + logger.warning('Attempted to find or generate SSH key files id_rsa and id_rsa.pub under ~/.ssh to allow SSH access ' + 'to the nodes. If using machines without permanent storage, back up your keys to a safe location.') def list_workspaces(client, resource_group=None):