Since you have added azure-webapps tag, just want to confirm are you leveraging/deployed an Azure WebApp?
If this is the case, just to highlight on Azure App Service standpoint:
To make open a direct SSH session with your container, you can use this URL (the WebApp must be running)
Paste the following URL into your browser and replace <app-name> with your app name:
https://<app-name>.**scm**.azurewebsites.net/webssh/host
With TCP tunneling technology for Azure App Service, it enables you to have SSH/SFTP access and remote debugging for Linux Web Apps.
Also, you can SSH into an app container using any SSH client of your choice (previously we only had SSH access through a Kudu web client).
Kindly check this doc for more info.
Open an SSH session to a Linux container in Azure App Service
If your requirement is different, please do share more details about our scenario and setup.
I have added additional tags to receive insights from the targetted audience/SMEs.