-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Description
Describe the bug
Former versions of the "standard" docker image (mcr.microsoft.com/azure-cli:latest) contained ssh command (formerly provided by installed openssh package).
This is no longer the case for version 2.54.0 build at 2023-11-08T05:17:55Z.
C:\Users\inno-steffg>docker run --rm -it mcr.microsoft.com/azure-cli:2.53.1
076587dd38b9:/# ssh
usage: ssh [-46AaCfGgKkMNnqsTtVvXxYy] [-B bind_interface]
[-b bind_address] [-c cipher_spec] [-D [bind_address:]port]
[-E log_file] [-e escape_char] [-F configfile] [-I pkcs11]
[-i identity_file] [-J [user@]host[:port]] [-L address]
[-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
[-Q query_option] [-R address] [-S ctl_path] [-W host:port]
[-w local_tun[:remote_tun]] destination [command [argument ...]]
C:\Users\inno-steffg>docker run --rm -it mcr.microsoft.com/azure-cli:2.54.0
8f4637cae6e2:/# ssh
bash: ssh: command not found
8f4637cae6e2:/# find -name "ssh"
./usr/share/bash-completion/completions/ssh
Having the ssh command within the container allowed to forward ports using a combination of Azure bastion and Azure virtual linux machine.
From the Azure CLI documentation, which shows how to map local SSH keys into the container, I concluded, that ssh is a part of the image.
Related command
docker run --rm -it mcr.microsoft.com/azure-cli sh -c "az extension add -n ssh && az login --use-device-code && az ssh vm --ip azureVm"
Errors
Failed to run ssh command with error: [Errno 2] No such file or directory: 'ssh'.
Ensure OpenSSH is installed correctly.
Alternatively, use --ssh-client-folder to provide OpenSSH folder path.
Issue script & Debug output
Expected behavior
SSH console opens
Environment Summary
azure-cli 2.54.0
core 2.54.0
telemetry 1.1.0
Dependencies:
msal 1.24.0b2
azure-mgmt-resource 23.1.0b2
Python location '/usr/local/bin/python'
Extensions directory '/root/.azure/cliextensions'
Python (Linux) 3.11.6 (main, Oct 19 2023, 05:43:48) [GCC 12.2.1 20220924]
Legal docs and information: aka.ms/AzureCliLegal
Additional context
No response