I have a running EC2 instance on which one of the database having transactional records stored through the application running on the same instance. I've change the port due to some security reasons but after changing port I'm unable to SSH to the instance.

My security group and NACL both having old as well as new port configured in it. I've tried to SSH several times but it gives error Network Error: Connection timeout. I'm scared about to data lost if this instance gets stopped. Need help!

1 Answers

0
Community On

You can login to instance without losing data with the help of 'session manager' option under the "System Manager". You will need to complete certain per-requisites of the session manager as follows given in the Amazon docs for Systems Manager Prerequisites

  1. After completing the per-requisites assign the IAM role to the EC2 instance created for SSM.
  2. Into the AWS console, search for the session manager option under the System manager and your instance ID will get listed over there.
  3. Select the instance and choose for the Start session, you will get the shell console of your instance.
  4. Revert the changes made in /etc/ssh/sshd_config for the port and try to SSH again.