question

Rajasekhar-7195 avatar image
4 Votes"
Rajasekhar-7195 asked SchmidtLukas-6116 answered

App Service SSH connection issue

SSH CONNECTION CLOSE - Error: getaddrinfo ENOTFOUND Couldnt connect to main site container Couldnt connect to main site container:2222Error: getaddrinfo ENOTFOUND Couldnt connect to main site container Couldnt connect to main site container:22222Error: connect ECONNREFUSED 172.16.0.3:2222Error: connect ECONNREFUSED 172.16.0.3:2222Error: connect ECONNREFUSED 172.16.0.3:2222 CREDENTIALS

Getting the above error when i try to connect Azure APP--Service--> WEBServiceTesting --> SSH

azure-webappsazure-monitor
· 1
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.

Exactly facing the same issue any help

0 Votes 0 ·
LeonLaude avatar image
0 Votes"
LeonLaude answered
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.

AbdelkrimBrussels avatar image
0 Votes"
AbdelkrimBrussels answered

Those solutions DO NOT help when using a Azure App on Linux.

Who could find an answer?

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.

DanBailey-8467 avatar image
0 Votes"
DanBailey-8467 answered

Same problem here - was hoping someone would post an answer.

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.

ErfanNariman-5893 avatar image
0 Votes"
ErfanNariman-5893 answered

Same problem, anyone found a solution?

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.

WinstonFan-5836 avatar image
0 Votes"
WinstonFan-5836 answered

Hi ,

This is year 2021, same problem.....

has anyone found a solution?

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.

AmiraSFARI-7849 avatar image
0 Votes"
AmiraSFARI-7849 answered

july 2021 and always same problem

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.

NiteshJain-7762 avatar image
1 Vote"
NiteshJain-7762 answered

SSH CONNECTION CLOSE - Error: connect ECONNREFUSED 172.16.46.3:2222Error: connect ECONNREFUSED 172.16.46.4:2222Error: connect EHOSTUNREACH 172.16.46.3:2222Error: connect ECONNREFUSED 172.16.46.3:2222Error: connect EHOSTUNREACH 172.16.46.4:2222Error: connect ECONNREFUSED 172.16.46.3:2222Error:

123320-image.png



Is there any will support on this?


image.png (41.5 KiB)
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.

RicardoFrazao-4089 avatar image
0 Votes"
RicardoFrazao-4089 answered

Hi All, I have exactly the same problem.

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.

YardyDavidCIN-1429 avatar image
0 Votes"
YardyDavidCIN-1429 answered

Hi All, I have exactly the same problem as well.

  1. Using ubuntu base image

  2. Docker file contains

https://docs.microsoft.com/en-us/azure/app-service/configure-custom-container?pivots=container-linux#enable-ssh

https://dev.to/s1ntaxe770r/how-to-setup-ssh-within-a-docker-container-i5i

RUN apt update && apt install openssh-server sudo -y
RUN echo 'root:Docker!' | chpasswd
RUN service ssh start

Copy the sshd_config file to the /etc/ssh/ directory

COPY sshd_config /etc/ssh/



sshd_config file looks like follows

Port 2222
ListenAddress 0.0.0.0
LoginGraceTime 180
X11Forwarding yes
Ciphers aes128-cbc,3des-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr
MACs hmac-sha1,hmac-sha1-96
StrictModes yes
SyslogFacility DAEMON
PasswordAuthentication yes
PermitEmptyPasswords no
PermitRootLogin yes
Subsystem sftp internal-sftp


within bootstrap.sh, started ssh server with

 echo "start ssh server"
 /usr/sbin/sshd
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.

DariusScherle-2298 avatar image
0 Votes"
DariusScherle-2298 answered DariusScherle-2298 commented

@YardyDavidCIN-1429 I'm doing the same and have the same problems. When i execute the command "usr/sbin/sshd" by myself i get the following issue:
Could not load host key: /etc/ssh/ssh_host_rsa_key
Could not load host key: /etc/ssh/ssh_host_ecdsa_key
Could not load host key: /etc/ssh/ssh_host_ed25519_key

It seems we need privilege to do it (https://askubuntu.com/questions/639983/sshd-could-not-load-host-key)

In the post of SnehaAgrawal-MSFT (https://docs.microsoft.com/en-us/answers/questions/220501/azure-web-app-with-linux-container-ssh-login-issue.html) he writes at is point 5 the statement - "RUN chmod 755 /opt/startup/init_container.sh". But for me this is not working. I get the error "chmod: cannot access '/opt/startup/init_ssh.sh': Not a directory"

Perhaps anyone can work with this information for another hint to find a solution?

· 2
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.

i also got the error "chmod: cannot access '/opt/startup/init_ssh.sh': Not a directory" . Switching to another directory solved the issue, e.g. using /home instead

0 Votes 0 ·

i i was also able to solve the build error, but the ssh access on the web app is still not available. does it work for you?

0 Votes 0 ·