azure-cli-extensions icon indicating copy to clipboard operation
azure-cli-extensions copied to clipboard

az ssh vm fails in 2.38

Open ecrowe-aridhia opened this issue 1 year ago • 2 comments

This is autogenerated. Please review and update as needed.

Describe the bug

Command Name az ssh vm Extension Name: ssh. Version: 1.1.2.

Errors:

Permission denied (publickey)

To Reproduce:

Steps to reproduce the behavior. Note that argument values have been redacted, as they may contain sensitive information. az login az ssh vm --ip 11.22.33.44

This command works fine with az version { "azure-cli": "2.37.0", "azure-cli-core": "2.37.0", "azure-cli-telemetry": "1.0.6", "extensions": { "azure-devops": "0.25.0", "ssh": "1.1.1" } } but fails with { "azure-cli": "2.38.0", "azure-cli-core": "2.38.0", "azure-cli-telemetry": "1.0.6", "extensions": { "ssh": "1.1.2" } }

  • Put any pre-requisite steps here...
  • az ssh vm --ip 11.22.33.44

Expected Behavior

logs into the vm

Environment Summary

Linux-5.10.102.1-microsoft-standard-WSL2-x86_64-with-glibc2.35, Ubuntu 22.04 LTS
Python 3.10.5
Installer: DEB

azure-cli 2.38.0

Extensions:
ssh 1.1.2

Dependencies:
msal 1.18.0b1
azure-mgmt-resource 21.1.0b1

Additional Context

ecrowe-aridhia avatar Jul 26 '22 17:07 ecrowe-aridhia

route to CXP team

yonzhan avatar Jul 27 '22 00:07 yonzhan

@ecrowe-aridhia We are looking into it and get back to you for any additional information.

SaurabhSharma-MSFT avatar Jul 27 '22 17:07 SaurabhSharma-MSFT

@ecrowe-aridhia I am not able to repro this issue. Can you please share the trace using --debug ?

SaurabhSharma-MSFT avatar Aug 26 '22 19:08 SaurabhSharma-MSFT

@SaurabhSharma-MSFT I've not been able to replicate this again recently.

ecrowe-aridhia avatar Aug 30 '22 09:08 ecrowe-aridhia

@ecrowe-aridhia Thanks for the confirmation. We will now proceed to close this thread. If there are further questions regarding this matter, please reopen it and we will gladly continue the discussion.

SaurabhSharma-MSFT avatar Aug 30 '22 16:08 SaurabhSharma-MSFT

I am currently encountering this exact issue. I have the same azure-cli version number as the OP (and one patch version higher for ssh):

{
  "azure-cli": "2.38.0",
  "azure-cli-core": "2.38.0",
  "azure-cli-telemetry": "1.0.6",
  "extensions": {
    "ssh": "1.1.3"
  }
}

davidr-PA avatar Dec 16 '22 02:12 davidr-PA

I am having the exact same issue on CLI version 2.50. Was this ever figured out? The VM has the AADSSHLoginForLinux extension installed, and the resource group has both roles "Virtual Machine User/Administrator Login", and lastly CLI has SSH extension installed.

az version: { "azure-cli": "2.50.0", "azure-cli-core": "2.50.0", "azure-cli-telemetry": "1.0.8", "extensions": { "ssh": "2.0.0" } }

Am performing the same steps:

  • az login
  • az ssh vm --ip 1.2.3.4

But getting error: -> "Permission denied (publickey)"

Can log into the box if --local-user azureuser specified with private key file.

blackbirdmango avatar Jul 18 '23 14:07 blackbirdmango