App service SSH problem - sshd: no hostkeys available -- exiting.

Tony 6 Reputation points Microsoft Vendor

Posting on behalf of a customer who keeps experiencing errors when trying to post.*

I have issues getting SSH to work in my App-service.

I've followed this tutorial:

Unable to post details of the docker file and ssh config as I keep getting an error. Full details can be found here though:

resulting logstream
2022-11-29T14:09:53.619211457Z Starting ssh
2022-11-29T14:09:53.629362955Z Started ssh
2022-11-29T14:09:53.629389255Z Starting gunicorn
2022-11-29T14:09:53.629412756Z sshd: no hostkeys available -- exiting.
2022-11-29T14:09:53.901363055Z [2022-11-29 14:09:53 +0000] [7] [INFO] Starting gunicorn 20.1.0
2022-11-29T14:09:53.901392755Z [2022-11-29 14:09:53 +0000] [7] [INFO] Listening at: (7)
2022-11-29T14:09:53.905616438Z [2022-11-29 14:09:53 +0000] [7] [INFO] Using worker: sync
2022-11-29T14:09:53.913574393Z [2022-11-29 14:09:53 +0000] [9] [INFO] Booting worker with pid: 9

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,326 questions
0 comments No comments
{count} vote

1 answer

Sort by: Most helpful
  1. Ryan Hill 26,946 Reputation points Microsoft Employee

    @Tony ,

    In your dockerfile, I don't see where you copied your script file. You're copying the existing (base image) file to /tmp. You create this file and copy it during docker build.

    1 person found this answer helpful.
    0 comments No comments