azure-cli-extensions
azure-cli-extensions copied to clipboard
can't ssh via bastion
uname -a: Darwin Davids-Work-MacBook-Pro.local 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:54 PST 2021; root:xnu-8019.61.5~1/RELEASE_X86_64 x86_64
az version { "azure-cli": "2.32.0", "azure-cli-core": "2.32.0", "azure-cli-telemetry": "1.0.6", "extensions": {} }
az network bastion ssh --name xxx --resource-group es-connectivity-xxx --target-resource-id nic-dts-dev-kigx-vm-vmLinux-0 --auth-type ssh-key --username vmadmin --ssh-key /Users/xxx/Downloads/vmadmin_id_rsa
Command group 'network bastion' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
The command failed with an unexpected error. Here is the traceback:
The extension ssh is not installed.
Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 658, in execute
raise ex
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 721, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 692, in _run_job
result = cmd_copy(params)
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
return self.handler(*args, **kwargs)
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/command_modules/network/custom.py", line 7995, in ssh_bastion_host
_test_extension(SSH_EXTENSION_NAME)
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/command_modules/network/custom.py", line 7928, in _test_extension
ext = get_extension(extension_name)
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/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.
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @aznetsuppgithub.
Issue Details
uname -a: Darwin Davids-Work-MacBook-Pro.local 21.2.0 Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:54 PST 2021; root:xnu-8019.61.5~1/RELEASE_X86_64 x86_64
az version { "azure-cli": "2.32.0", "azure-cli-core": "2.32.0", "azure-cli-telemetry": "1.0.6", "extensions": {} }
az network bastion ssh --name xxx --resource-group es-connectivity-xxx --target-resource-id nic-dts-dev-kigx-vm-vmLinux-0 --auth-type ssh-key --username vmadmin --ssh-key /Users/xxx/Downloads/vmadmin_id_rsa
Command group 'network bastion' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
The command failed with an unexpected error. Here is the traceback:
The extension ssh is not installed.
Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/knack/cli.py", line 231, in invoke
cmd_result = self.invocation.execute(args)
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 658, in execute
raise ex
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 721, in _run_jobs_serially
results.append(self._run_job(expanded_arg, cmd_copy))
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 692, in _run_job
result = cmd_copy(params)
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 328, in __call__
return self.handler(*args, **kwargs)
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
return op(**command_args)
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/command_modules/network/custom.py", line 7995, in ssh_bastion_host
_test_extension(SSH_EXTENSION_NAME)
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/lib/python3.10/site-packages/azure/cli/command_modules/network/custom.py", line 7928, in _test_extension
ext = get_extension(extension_name)
File "/usr/local/Cellar/azure-cli/2.32.0/libexec/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.
Author: | davidkarlsen |
---|---|
Assignees: | - |
Labels: |
|
Milestone: | - |
route to service team
If you do a az extension add --name ssh
it should install the extension for you
If you do a
az extension add --name ssh
it should install the extension for you
it is only supported on windows :( Mac support for a start would be great.
On Mac M1 running macOS 12.5.1 it looks good now:
% az version
{
"azure-cli": "2.39.0",
"azure-cli-core": "2.39.0",
"azure-cli-telemetry": "1.0.6",
"extensions": {
"account": "0.2.3",
"spring": "1.1.5",
"ssh": "1.1.2"
}
}
@yonzhan looks like it is supported. Can we close this?
It has worked for quite some time and can be closed
Reopening because the error message should be actionable i.e. it should provide the command to install the ssh extension. We can't expect customers to know what how to resolve "extension ssh is not installed" @yonzhan