Skip to content

az ssh arc execution is failing with an unexpected error. #31408

@bandhand

Description

@bandhand

Describe the bug

when i execute the following command I get an unexpected error. The same command was successfully working on az cli version 2.69.0

Related command

az ssh arc --local-user azureuser --resource-group bsd-ALRS-P1-test --name VM0501-vm --private-key-file VMdeploy0507.pem

Errors

The command failed with an unexpected error. Here is the traceback:
No module named 'rpds.rpds'
Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 564, in execute
self.commands_loader.load_arguments(command)
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/azure/cli/core/init.py", line 548, in load_arguments
self.command_table[command].load_arguments() # this loads the arguments via reflection
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 321, in load_arguments
super().load_arguments()
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/knack/commands.py", line 104, in load_arguments
cmd_args = self.arguments_loader()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 124, in arguments_loader
op = self.get_op_handler(self.op_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 59, in get_op_handler
handler = import_module(mod_to_import)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/python@3.12/3.12.10/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 999, in exec_module
File "", line 488, in _call_with_frames_removed
File "/Users/an-bsd/.azure/cliextensions/ssh/azext_ssh/custom.py", line 20, in
from . import rdp_utils
File "/Users/an-bsd/.azure/cliextensions/ssh/azext_ssh/rdp_utils.py", line 19, in
from . import ssh_utils
File "/Users/an-bsd/.azure/cliextensions/ssh/azext_ssh/ssh_utils.py", line 20, in
from . import connectivity_utils
File "/Users/an-bsd/.azure/cliextensions/ssh/azext_ssh/connectivity_utils.py", line 10, in
import oras.client
File "/Users/an-bsd/.azure/cliextensions/ssh/oras/client.py", line 12, in
import oras.provider
File "/Users/an-bsd/.azure/cliextensions/ssh/oras/provider.py", line 14, in
import jsonschema
File "/Users/an-bsd/.azure/cliextensions/ssh/jsonschema/init.py", line 13, in
from jsonschema._format import FormatChecker
File "/Users/an-bsd/.azure/cliextensions/ssh/jsonschema/_format.py", line 11, in
from jsonschema.exceptions import FormatError
File "/Users/an-bsd/.azure/cliextensions/ssh/jsonschema/exceptions.py", line 15, in
from referencing.exceptions import Unresolvable as _Unresolvable
File "/Users/an-bsd/.azure/cliextensions/ssh/referencing/init.py", line 5, in
from referencing._core import Anchor, Registry, Resource, Specification
File "/Users/an-bsd/.azure/cliextensions/ssh/referencing/_core.py", line 9, in
from rpds import HashTrieMap, HashTrieSet, List
File "/Users/an-bsd/.azure/cliextensions/ssh/rpds/init.py", line 1, in
from .rpds import *
ModuleNotFoundError: No module named 'rpds.rpds'
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues

Issue script & Debug output

az ssh arc --local-user azureuser --resource-group bsd-ALRS-P1-test --name VM0501-vm --private-key-file VMdeploy0507.pem --debug
cli.knack.cli: Command arguments: ['ssh', 'arc', '--local-user', 'azureuser', '--resource-group', 'bsd-ALRS-P1-test', '--name', 'VM0501-vm', '--private-key-file', 'VMdeploy0507.pem', '--debug']
cli.knack.cli: init debug log:
Enable color in terminal.
cli.knack.cli: Event: Cli.PreExecute []
cli.knack.cli: Event: CommandParser.OnGlobalArgumentsCreate [<function CLILogging.on_global_arguments at 0x1065caf20>, <function OutputProducer.on_global_arguments at 0x1067afc40>, <function CLIQuery.on_global_arguments at 0x1067f1440>]
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableCreate []
cli.azure.cli.core: Modules found from index for 'ssh': ['azext_ssh']
cli.azure.cli.core: Loading command modules:
cli.azure.cli.core: Name Load Time Groups Commands
cli.azure.cli.core: Total (0) 0.000 0 0
cli.azure.cli.core: These extensions are not installed and will be skipped: ['azext_ai_examples', 'azext_next']
cli.azure.cli.core: Loading extensions:
cli.azure.cli.core: Name Load Time Groups Commands Directory
cli.azure.cli.core: ssh 1.540 1 4 /Users/an-bsd/.azure/cliextensions/ssh
cli.azure.cli.core: Total (1) 1.540 1 4
cli.azure.cli.core: Loaded 1 groups, 4 commands.
cli.azure.cli.core: Found a match in the command table.
cli.azure.cli.core: Raw command : ssh arc
cli.azure.cli.core: Command table: ssh arc
cli.knack.cli: Event: CommandInvoker.OnPreCommandTableTruncate [<function AzCliLogging.init_command_file_logging at 0x107afe980>]
cli.azure.cli.core.azlogging: metadata file logging enabled - writing logs to '/Users/an-bsd/.azure/commands/2025-05-05.15-46-08.ssh_arc.9640.log'.
az_command_data_logger: command args: ssh arc --local-user {} --resource-group {} --name {} --private-key-file {} --debug
cli.knack.cli: Event: CommandInvoker.OnPreArgumentLoad [<function register_global_subscription_argument..add_subscription_parameter at 0x107b99ee0>]
cli.azure.cli.core.azclierror: Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 564, in execute
self.commands_loader.load_arguments(command)
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/azure/cli/core/init.py", line 548, in load_arguments
self.command_table[command].load_arguments() # this loads the arguments via reflection
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 321, in load_arguments
super().load_arguments()
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/knack/commands.py", line 104, in load_arguments
cmd_args = self.arguments_loader()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 124, in arguments_loader
op = self.get_op_handler(self.op_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 59, in get_op_handler
handler = import_module(mod_to_import)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/python@3.12/3.12.10/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 999, in exec_module
File "", line 488, in _call_with_frames_removed
File "/Users/an-bsd/.azure/cliextensions/ssh/azext_ssh/custom.py", line 20, in
from . import rdp_utils
File "/Users/an-bsd/.azure/cliextensions/ssh/azext_ssh/rdp_utils.py", line 19, in
from . import ssh_utils
File "/Users/an-bsd/.azure/cliextensions/ssh/azext_ssh/ssh_utils.py", line 20, in
from . import connectivity_utils
File "/Users/an-bsd/.azure/cliextensions/ssh/azext_ssh/connectivity_utils.py", line 10, in
import oras.client
File "/Users/an-bsd/.azure/cliextensions/ssh/oras/client.py", line 12, in
import oras.provider
File "/Users/an-bsd/.azure/cliextensions/ssh/oras/provider.py", line 14, in
import jsonschema
File "/Users/an-bsd/.azure/cliextensions/ssh/jsonschema/init.py", line 13, in
from jsonschema._format import FormatChecker
File "/Users/an-bsd/.azure/cliextensions/ssh/jsonschema/_format.py", line 11, in
from jsonschema.exceptions import FormatError
File "/Users/an-bsd/.azure/cliextensions/ssh/jsonschema/exceptions.py", line 15, in
from referencing.exceptions import Unresolvable as _Unresolvable
File "/Users/an-bsd/.azure/cliextensions/ssh/referencing/init.py", line 5, in
from referencing._core import Anchor, Registry, Resource, Specification
File "/Users/an-bsd/.azure/cliextensions/ssh/referencing/_core.py", line 9, in
from rpds import HashTrieMap, HashTrieSet, List
File "/Users/an-bsd/.azure/cliextensions/ssh/rpds/init.py", line 1, in
from .rpds import *
ModuleNotFoundError: No module named 'rpds.rpds'

cli.azure.cli.core.azclierror: The command failed with an unexpected error. Here is the traceback:
az_command_data_logger: The command failed with an unexpected error. Here is the traceback:
cli.azure.cli.core.azclierror: No module named 'rpds.rpds'
Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 564, in execute
self.commands_loader.load_arguments(command)
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/azure/cli/core/init.py", line 548, in load_arguments
self.command_table[command].load_arguments() # this loads the arguments via reflection
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 321, in load_arguments
super().load_arguments()
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/knack/commands.py", line 104, in load_arguments
cmd_args = self.arguments_loader()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 124, in arguments_loader
op = self.get_op_handler(self.op_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 59, in get_op_handler
handler = import_module(mod_to_import)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/python@3.12/3.12.10/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 999, in exec_module
File "", line 488, in _call_with_frames_removed
File "/Users/an-bsd/.azure/cliextensions/ssh/azext_ssh/custom.py", line 20, in
from . import rdp_utils
File "/Users/an-bsd/.azure/cliextensions/ssh/azext_ssh/rdp_utils.py", line 19, in
from . import ssh_utils
File "/Users/an-bsd/.azure/cliextensions/ssh/azext_ssh/ssh_utils.py", line 20, in
from . import connectivity_utils
File "/Users/an-bsd/.azure/cliextensions/ssh/azext_ssh/connectivity_utils.py", line 10, in
import oras.client
File "/Users/an-bsd/.azure/cliextensions/ssh/oras/client.py", line 12, in
import oras.provider
File "/Users/an-bsd/.azure/cliextensions/ssh/oras/provider.py", line 14, in
import jsonschema
File "/Users/an-bsd/.azure/cliextensions/ssh/jsonschema/init.py", line 13, in
from jsonschema._format import FormatChecker
File "/Users/an-bsd/.azure/cliextensions/ssh/jsonschema/_format.py", line 11, in
from jsonschema.exceptions import FormatError
File "/Users/an-bsd/.azure/cliextensions/ssh/jsonschema/exceptions.py", line 15, in
from referencing.exceptions import Unresolvable as _Unresolvable
File "/Users/an-bsd/.azure/cliextensions/ssh/referencing/init.py", line 5, in
from referencing._core import Anchor, Registry, Resource, Specification
File "/Users/an-bsd/.azure/cliextensions/ssh/referencing/_core.py", line 9, in
from rpds import HashTrieMap, HashTrieSet, List
File "/Users/an-bsd/.azure/cliextensions/ssh/rpds/init.py", line 1, in
from .rpds import *
ModuleNotFoundError: No module named 'rpds.rpds'
az_command_data_logger: No module named 'rpds.rpds'
Traceback (most recent call last):
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/knack/cli.py", line 233, in invoke
cmd_result = self.invocation.execute(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 564, in execute
self.commands_loader.load_arguments(command)
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/azure/cli/core/init.py", line 548, in load_arguments
self.command_table[command].load_arguments() # this loads the arguments via reflection
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/init.py", line 321, in load_arguments
super().load_arguments()
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/knack/commands.py", line 104, in load_arguments
cmd_args = self.arguments_loader()
^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 124, in arguments_loader
op = self.get_op_handler(self.op_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/azure/cli/core/commands/command_operation.py", line 59, in get_op_handler
handler = import_module(mod_to_import)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/Cellar/python@3.12/3.12.10/Frameworks/Python.framework/Versions/3.12/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 999, in exec_module
File "", line 488, in _call_with_frames_removed
File "/Users/an-bsd/.azure/cliextensions/ssh/azext_ssh/custom.py", line 20, in
from . import rdp_utils
File "/Users/an-bsd/.azure/cliextensions/ssh/azext_ssh/rdp_utils.py", line 19, in
from . import ssh_utils
File "/Users/an-bsd/.azure/cliextensions/ssh/azext_ssh/ssh_utils.py", line 20, in
from . import connectivity_utils
File "/Users/an-bsd/.azure/cliextensions/ssh/azext_ssh/connectivity_utils.py", line 10, in
import oras.client
File "/Users/an-bsd/.azure/cliextensions/ssh/oras/client.py", line 12, in
import oras.provider
File "/Users/an-bsd/.azure/cliextensions/ssh/oras/provider.py", line 14, in
import jsonschema
File "/Users/an-bsd/.azure/cliextensions/ssh/jsonschema/init.py", line 13, in
from jsonschema._format import FormatChecker
File "/Users/an-bsd/.azure/cliextensions/ssh/jsonschema/_format.py", line 11, in
from jsonschema.exceptions import FormatError
File "/Users/an-bsd/.azure/cliextensions/ssh/jsonschema/exceptions.py", line 15, in
from referencing.exceptions import Unresolvable as _Unresolvable
File "/Users/an-bsd/.azure/cliextensions/ssh/referencing/init.py", line 5, in
from referencing._core import Anchor, Registry, Resource, Specification
File "/Users/an-bsd/.azure/cliextensions/ssh/referencing/_core.py", line 9, in
from rpds import HashTrieMap, HashTrieSet, List
File "/Users/an-bsd/.azure/cliextensions/ssh/rpds/init.py", line 1, in
from .rpds import *
ModuleNotFoundError: No module named 'rpds.rpds'
To check existing issues, please visit: https://github.com/Azure/azure-cli/issues
cli.knack.cli: Event: Cli.PostExecute [<function AzCliLogging.deinit_cmd_metadata_logging at 0x107afec00>]
az_command_data_logger: exit code: 1
cli.main: Command ran in 4.011 seconds (init: 1.096, invoke: 2.916)
telemetry.main: Begin splitting cli events and extra events, total events: 1
telemetry.client: Accumulated 0 events. Flush the clients.
telemetry.main: Finish splitting cli events and extra events, cli events: 1
telemetry.save: Save telemetry record of length 7983 in cache file under /Users/an-bsd/.azure/telemetry/20250505154610448
telemetry.main: Begin creating telemetry upload process.
telemetry.process: Creating upload process: "/usr/local/Cellar/azure-cli/2.71.0/libexec/bin/python /usr/local/Cellar/azure-cli/2.71.0/libexec/lib/python3.12/site-packages/azure/cli/telemetry/init.py /Users/an-bsd/.azure /Users/an-bsd/.azure/telemetry/20250505154610448"
telemetry.process: Return from creating process 9646
telemetry.main: Finish creating telemetry upload process.

Expected behavior

should ssh successfully to the ARC VM

Environment Summary

az version
{
"azure-cli": "2.71.0",
"azure-cli-core": "2.71.0",
"azure-cli-telemetry": "1.1.0",
"extensions": {
"aosm": "2.0.0b1",
"arcappliance": "1.4.1",
"bastion": "1.4.0",
"connectedk8s": "1.10.7",
"connectedmachine": "1.1.0",
"customlocation": "0.1.4",
"hybridaks": "0.2.4",
"k8s-configuration": "2.2.0",
"k8s-extension": "1.6.4",
"managednetworkfabric": "7.1.0",
"monitor-control-service": "1.2.0",
"networkcloud": "3.0.0",
"ssh": "2.0.6",
"stack-hci-vm": "1.8.2"
}
}

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Auto-AssignAuto assign by botPossible-SolutionSSHService AttentionThis issue is responsible by Azure service team.Similar-IssueVM SSHbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions