Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

az ssh command doesn't work due to OpenSSH not being installed in the docker container #146

Closed
Gilthans opened this issue Apr 3, 2024 · 4 comments
Assignees
Labels
question Requiring some clarification

Comments

@Gilthans
Copy link

Gilthans commented Apr 3, 2024

Trying to use az ssh vm with this action does not work, and fails with:

WARNING: The command requires the extension ssh. It will be installed first.
WARNING: Default enabled including preview versions for extension installation now. Disabled in May 2024. Use '--allow-preview true' to enable it specifically if needed. Use '--allow-preview false' to install stable version only. 
ERROR: Failed to run ssh command with error: [Errno 2] No such file or directory: 'ssh'.

Attempting to install OpenSSH inside the inline script didn't seem to resolve the issue.
Is there a way to get this working?

@Gilthans Gilthans added the need-to-triage Requires investigation label Apr 3, 2024
@MoChilia
Copy link
Member

MoChilia commented Apr 8, 2024

Hi @Gilthans, have you added the ssh extension with az extension add --name ssh before trying az ssh vm?

@MoChilia MoChilia added question Requiring some clarification and removed need-to-triage Requires investigation labels Apr 8, 2024
@Gilthans
Copy link
Author

Gilthans commented Apr 8, 2024

I did not, but the tool was trying to install the extension automatically which is when it failed

@MoChilia
Copy link
Member

MoChilia commented Apr 9, 2024

@Gilthans, according to Azure/azure-cli#27841 (comment), azure-cli has removed ssh from the docker image since 2.54.0, you have to install it manually. If you have already installed OpenSSH but the error persists, you can try using the argument --ssh-client-folder to provide the OpenSSH folder path.

@MoChilia
Copy link
Member

Closing the issue for now. If you have any further questions, feel free to reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Requiring some clarification
Projects
None yet
Development

No branches or pull requests

2 participants