Azure / Azure/azure-cli

Using Bastion to access the jump host via SSH

Open
#26,394 6 comments 0 reactions 0 assignees View on GitHub
act-quality-productivity-squad Auto-Assign Auto-Resolve Network Network - Bastion Possible-Solution Service Attention Similar-Issue Test
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### **This is autogenerated. Please review and update as needed.**

## Describe the bug

**Command Name**
`az network bastion ssh`

**Errors:**
```
The command failed with an unexpected error. Here is the traceback:
The extension ssh is not installed.
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 "/opt/az/lib/python3.10/site-packages/azure/cli/command_modules/network/custom.py", line 8263, in ssh_bastion_host
_test_extension(SSH_EXTENSION_NAME)
File "/opt/az/lib/python3.10/site-packages/azure/cli/command_modules/network/custom.py", line 8191, in _test_extension
ext = get_extension(extension_name)
File "/opt/az/lib/python3.10/site-packages/azure/cli/core/extension/__init__.py", line 340, in get_extension
raise ExtensionNotInstalledException(ext_name)
azure.cli.core.extension.ExtensionNotInstalledException: The extension ssh is not installed.

```

## 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 network bastion ssh --auth-type {} --name {} --resource-group {} --username {} --ssh-key {} --target-resource-id {}`

## Expected Behavior

## Environment Summary
```
Linux-5.19.0-38-generic-x86_64-with-glibc2.35, Ubuntu 22.04.1 LTS
Python 3.10.8
Installer: DEB

azure-cli 2.43.0 *

Extensions:
azure-devops 0.26.0
aks-preview 0.5.123

Dependencies:
msal 1.20.0
azure-mgmt-resource 21.1.0b1
```
## Additional Context

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.