SSH connection refused - M6G instance (ARM) aws linux 2 issue -

0

We launch an m6g instance from Amazon Linux 2 LTS Arm64 AMI 2.0.20200722.0 arm64 HVM gp2 (ami-0c5bf07e510b75b11). We change /etc/ssh/sshd_config to add below 3 lines to it to change default port etc. We reload ssh service, restart ssh service, even reboot this server and are able to SSH to the server perfectly fine.

Now we take an AMI from the machine ami-xxxxxxx and start a new instance from this ami and instance comes up but SSH connection says connection refused right away. We repeated this ami process on another instance with just port change in sshd_config (and not the other 2 lines) and it still fails. We tried rebooting these servers and console log shows everything is normal but all we get is SSH connection refused right away.

Port 30000
PasswordAuthentication yes
AuthenticationMethods publickey,password

This is not a sec group issue as the source server and target server are in the same sec group and 30000/22 are both open to ssh client ip.

We cannot use the new m6g instances as we cannot customize the server, esp sshd. WE have done 100s of ami's in past and not sure why AMz Lnux 2 with ARM is having this issue and other non-arm instances have no issue.

Anyone have a clue?

efaws
已提問 4 年前檢視次數 474 次
1 個回答
0

cloud init is resetting password auth to no for sshd

efaws
已回答 4 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南