Skip to content

az ssh vm - 'str' object has no attribute 'get' #5984

@onepar

Description

@onepar

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name
az ssh vm Extension Name: ssh. Version: 1.1.4.

Errors:

Paste here the error message you have received. Make sure to remove all sensitive information,
such as user name, password, credential, subscription ID, etc.
The command failed with an unexpected error. Here is the traceback:
'str' object has no attribute 'get'
Traceback (most recent call last):
  File "/opt/az/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
    raise ex
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/home/user1/.azure/cliextensions/ssh/azext_ssh/custom.py", line 66, in ssh_vm
    _do_ssh_op(cmd, ssh_session, op_call)
  File "/home/user1/.azure/cliextensions/ssh/azext_ssh/custom.py", line 159, in _do_ssh_op
    op_info.ip = op_info.ip or ip_utils.get_ssh_ip(cmd, op_info.resource_group_name,
  File "/home/user1/.azure/cliextensions/ssh/azext_ssh/ip_utils.py", line 36, in get_ssh_ip
    if public_ip_ref and public_ip_ref.get("id", None):
AttributeError: 'str' object has no attribute 'get'
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
To open a new issue, please run `az feedback`

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.

  • Put any pre-requisite steps here...
  • az ssh vm --local-user {} --private-key-file {} -n {} -g {}

Expected Behavior

Environment Summary

Linux-5.15.90.1-microsoft-standard-WSL2-x86_64-with-glibc2.35, Ubuntu 22.04.2 LTS
Python 3.10.10
Installer: DEB

azure-cli 2.46.0

Extensions:
ssh 1.1.4

Dependencies:
msal 1.20.0
azure-mgmt-resource 21.1.0b1

Additional Context

Metadata

Metadata

Assignees

Labels

Auto-AssignAuto assign by botCXP AttentionThis issue is handled by CXP team.VM SSHcustomer-reportedIssues that are reported by GitHub users external to the Azure organization.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions