question

intgbackup-7717 avatar image
0 Votes"
intgbackup-7717 asked brtrach-MSFT answered

Unable to ssh into web app

Hii there,

We are facing an issue , details are as below.

we have followed below document & created a web app container. I was able to ssh into it.
https://docs.microsoft.com/en-us/azure/app-service/tutorial-custom-container?pivots=container-linux

The same thing i have implemented in my custom dockerfile & code, created a web app out of it. but getting error while doing ssh
SSH CONNECTION CLOSE - Error: connect ECONNREFUSED 172.16.1.5:2222 CREDENTIALS

We have followed below document as well.
https://docs.microsoft.com/en-us/azure/app-service/configure-custom-container?pivots=container-linux#enable-ssh

It would be great help if someone gives us a helping hand.
thanks in advance.

azure-webapps-ssh
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

brtrach-MSFT avatar image
0 Votes"
brtrach-MSFT answered

@intgbackup-7717 Since the community does not seem to have an answer, we wanted to reach out and see if you still require assistance with this matter.

There are a number of reasons why this error can be caused. Below are a few items to review.

With Docker in App Services, SSH needs to be enabled on the image itself, with the SSH server using the credentials username 'root', password 'Docker!' and listening on port 2222, exposed to port 80. Additionally, it's important to be aware that in Docker Compose deployments, only the primary container will be accessible over SSH.

You can also compare/contrast your files to the ones listed here, which is are known working SSH samples for django or python:

https://github.com/Azure-Samples/docker-django-webapp-linux

https://github.com/Azure-App-Service/python/tree/master/3.7

Sometimes scaling up your web app, waiting 20-30 minutes, and then scaling back down can also help if SSH falls into a locked state, which is rare but an easy troubleshooting step to try.

Let us know the results of the above suggestions. We look forward to your reply.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.