Open rybal06 opened 4 months ago
Hi @rybal06 Find similar issue https://github.com/Azure/azure-cli/issues/29006. | ||
---|---|---|
Issue title | az ssh arc connection issue using Service Principal | |
Create time | 2024-05-22 | |
Comment number | 4 |
Please confirm if this resolves your issue.
Thank you for opening this issue, we will look into it.
Hi @rybal06 Find similar issue #29006.
Issue title az ssh arc connection issue using Service Principal Create time 2024-05-22 Comment number 4 Please confirm if this resolves your issue.
I didn't see that issue in my initial search..That issue is very similar, and I can confirm that reverting to 2.59.0 works around the issue.
Describe the bug
I have reproduced this issue on both Ubuntu20.04 and RHEL8 images from the Azure Marketplace; as well as Microsoft hosted Azure DevOps Ubuntu Runners.
These versions work: 2.55.0, 2.56.0, 2.57.0, 2.58.0, 2.59.0
Broken: 2.60.0, 2.61.0, 2.62.0
Steps:
Deploy two target Linux VMs in Azure:
Create a new EntraID service principal. Grant the service principal the "virtual machine administrator login" role assignment on each virtual machine.
Deploy an ubuntu control host to test using Azure CLI to connect:
Install azure cli, and signin on the control host:
Run this shell script:
Observe whichever host is configured first using az ssh config works; whichever is configured second will fail with this error:
The the second host will always fail.
If you switch the order of the az ssh config commands, the opposite host will fail.
If you revert to Azure-cli 2.59.0 or older, this issue is not present:
Related command
az ssh config
Errors
The command completes successfully, however the key does not work for which whichever host has keys created second.
Issue script & Debug output
Expected behavior
I can set up ssh keys for multiple hosts using az ssh config on versions newer than azure-cli 2.60; as works in 2.59.0 and older.
Environment Summary
Additional context
No response