If I use port 2222 instead of port 22 (SSH) for the secure endpoint connection feature on the instance...?

0

The secure endpoint connection limitations were originally mentioned for ports 22 and 3389. Now, I have a question: I changed the port to 2222 instead of 22 in the instance security group. However, I am unable to connect to the private instance. Should I enable port 22 in both security group rules to address this limitation?

KARTHIK
質問済み 7ヶ月前736ビュー
2回答
0

However, I am unable to connect to the private instance.

Did you mean you cannot connect to an EC2 instance in a private subnet via the Internet? If so, you need to place your instance in a public subnet.

Should I enable port 22 in both security group rules to address this limitation?

If you simply want to log in to the instance and run some commands, you can use Session Manager to connect your instance without any inbound ports and SSH keys.

profile picture
HS
回答済み 7ヶ月前
  • My question here pertains to the security group for the endpoint, which has port 22 open, while the private instance can have any other port open instead of port 22, correct?

  • Yes, I modified the SSH daemon configuration on the private instance using this path: sudo vi /etc/ssh/sshd_config. I also restarted the SSH service, but unfortunately, I still couldn't establish a connection to the instance.

0

Hello.

The documentation below states that only ports 22 and 3389 are supported.
You cannot connect using any other port number.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/connect-using-eice.html

Only ports 22 and 3389 are supported.

profile picture
エキスパート
回答済み 7ヶ月前
profile pictureAWS
エキスパート
レビュー済み 7ヶ月前
  • Hi, in addition to Riku's point: changing the port is not enough anyway. You must reconfigure the ssh deamon on the instance to make it for connections on another point for your change to work

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ