Unable to ssh into web app

intg backup 1 Reputation point
2021-07-09T18:01:58.003+00:00

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://learn.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://learn.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 App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,046 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 16,686 Reputation points Microsoft Employee
    2021-07-27T04:24:33.537+00:00

    @intg backup 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.

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.