VS Code SSH client keeps disconnecting from EC2 instance

0

I am getting connected to the ec2 (ubuntu) instance with VScode SSH and after a few seconds it gets disconnected and impossible to reconnect if I don't reboot the instance and after dozens of attempts to reconnect. Is there something I should check that I haven't? are there any special configurations i need to make?

질문됨 9달 전940회 조회
3개 답변
0

Are you sure that instance state remains healthy when you get disconnected from VS code SSH client.

Based on the problem description, issue seems to be something at instance side, network configuration might be right as after rebooting the instance you are able to connect.

I'd start with following:

Check cloudwatch metrics for this EC2 instance and make sure that EC2 instance is not running out of memory/CPU 100% utilization

Next thing I'd do is, set up EC2 Serial Console and then see what exactly is going on.

Comment here how it goes, happy to assist further.

Abhishek

profile pictureAWS
전문가
답변함 9달 전
  • The cpu is almost 0 because nothing is running at the moment.

  • Yes my CPU utilization goes to 100%. How will I be able to fix that?

0

this is what I get when I try to connect with the serial console after setting up IAM Policy

답변함 9달 전
0

I get the same issue. VS code keeps disconnecting from the EC2, and I am not able to reconnect unless I restart the instance.

heyaozh
답변함 8달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠