Thanks for reply! To elaborate on this, there may be multiple reasons for unable to use the SSH feature in Kudu.
The most common cause of an inability to SSH into a container is either the Web App isn't running or the Kudu container isn't running. Therefore, if you are unable to SSH into your app container, you should do the following two things first.
- Ensure that the Web App is currently running.
- Ensure that the Kudu site is currently running.
If your Web App is not running and won't start then check the docker log, this is helpful in troubleshooting your site when it doesn't start or if it's restarting. Different ways to access Docker logs is below:
- Docker logs appear on the Container Settings page in the portal.
- You can find the Docker log in the /LogFiles directory. You can access this via the Kudu (Advanced Tools) Bash console or by using
an FTP client to access it.
- You can use our API to download the current logs.
You may refer to the blog Things You Should Know: Web Apps and Linux for more details on this.
If the Kudu site isn't running, please let me know.
Note: Whether you're using SSH via a web browser or using the TCP tunnel method, SSH connections are always hitting an endpoint in the Kudu container. If the Kudu container isn't running, you won't be able to SSH into the app's container.
Also, it could a browser related issue or a backend issue. Starting a SSH session in a different browser might helps, try starting a SSH session by running
az webapp ssh -n MyUniqueAppName -g MyResourceGroup in the Azure CLI
If case you are using a docker-compose file with multiple containers for your App, keep in mind that Azure will always connect to the frontend container even if other containers have port 2222 exposed.
Check this discussion here.
Check this blog: Things You Should Know: Web Apps and SSH
Hope this helps.