-
Notifications
You must be signed in to change notification settings - Fork 1.5k
az ssh vm does not work on private VM #2762
Copy link
Copy link
Open
Labels
ComputeVM SSHfeature-requestThis issue requires a new behavior in the product in order be resolved.This issue requires a new behavior in the product in order be resolved.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone
Description
This is autogenerated. Please review and update as needed.
Describe the bug
I was trying to access a Bastion Host, wich has no public IP address.
Command Name
az ssh vm Extension Name: ssh. Version: 0.1.0.
Errors:
'NoneType' object has no attribute 'id'
Traceback (most recent call last):
python3.8/site-packages/knack/cli.py, ln 215, in invoke
cmd_result = self.invocation.execute(args)
cli/core/commands/__init__.py, ln 654, in execute
raise ex
cli/core/commands/__init__.py, ln 717, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
cli/core/commands/__init__.py, ln 710, in _run_job
six.reraise(*sys.exc_info())
...
cliextensions/ssh/azext_ssh/custom.py, ln 19, in ssh_vm
_do_ssh_op(cmd, resource_group_name, vm_name, ssh_ip,
cliextensions/ssh/azext_ssh/custom.py, ln 32, in _do_ssh_op
ssh_ip = ssh_ip or ip_utils.get_ssh_ip(cmd, resource_group, vm_name)
cliextensions/ssh/azext_ssh/ip_utils.py, ln 27, in get_ssh_ip
parsed_ip_id = tools.parse_resource_id(public_ip_ref.id)
AttributeError: 'NoneType' object has no attribute 'id'
To Reproduce:
Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information.
az ssh vm --resource-group {} --vm-name {}
Expected Behavior
Successful SSH connection and login.
Environment Summary
macOS-10.15.7-x86_64-i386-64bit
Python 3.8.6
Installer: HOMEBREW
azure-cli 2.15.1
Extensions:
ssh 0.1.0
Additional Context
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ComputeVM SSHfeature-requestThis issue requires a new behavior in the product in order be resolved.This issue requires a new behavior in the product in order be resolved.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that