问题描述
我想SSH到在Azure应用服务中创建的容器.这些是基于Linux的容器,并使用Docker Compose将其部署到Azure App Service.
I want to SSH to my containers created in an Azure App Service. These are Linux based containers and used Docker Compose to deploy these to Azure App Service.
我已遵循 article 以启用SSH.对于其中一个容器(容器A),我可以SSH(为此使用暴露的端口2222、80).但是我也想通过SSH连接到其他容器(容器B).我公开了容器B的另一个端口2223,并按照该文档中的相同步骤进行操作.当我尝试使用命令 ssh [email protected] -p 2223 访问它们时,出现错误Connection Refused.但是命令 ssh [email protected] -p 2222 适用于容器A,当我运行Top命令时,我能够看到该容器A中API的Dotnet进程正在运行
I have followed the article to enable SSH. For one of the container (Container A) I am able to SSH (exposed port 2222, 80 for this). But I would like to SSH to other containers (Container B) too. I have exposed another port 2223 for Container B and followed the same steps in that document. When I try to access them using the command ssh [email protected] -p 2223, I get the error Connection Refused. But the command ssh [email protected] -p 2222 works for the Container A and I am able to see the Dotnet process running for the API in that Container A when I run the Top command
推荐答案
进一步研究后,我发现我们无法通过SSH到多容器.当前,Azure仅支持SSH到面向公众的容器.基于此链接其由Azure应用服务团队计划!
After further research, I found out that we cannot SSH to multi container. Currently Azure supports SSH to public facing container only. Based on this link its planned by Azure App Service team!
这篇关于如何在多容器Azure App Service中通过SSH连接到不同的容器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!