- Newest
- Most votes
- Most comments
This issue where EC2 Instance Connect works from one laptop but not another is typically caused by one of several factors:
-
Security Group Configuration: The most common cause is that your security group doesn't allow inbound SSH traffic (port 22) from the EC2 Instance Connect IP range for your specific AWS region. Each region has its own IP range that needs to be allowed in your security group's inbound rules.
-
Network Configuration: Your current laptop might be on a network that's blocking outbound SSH connections or has firewall rules preventing the connection. Since you mentioned you can connect using MobaXterm and CMD from the same laptop, this suggests the issue is specific to the browser-based connection.
-
Browser Settings: Even though you've checked pop-up settings, there might be other browser extensions or security settings blocking the connection. Try completely disabling all extensions temporarily.
-
IAM Permissions: Your IAM user might not have the necessary permissions to use EC2 Instance Connect. Verify that your user has the "ec2-instance-connect:SendSSHPublicKey" permission.
-
Instance Status: Check if your instance has passed all status checks. A failing status check could indicate an OS-level issue preventing connections.
-
EC2 Instance Connect Prerequisites: Ensure the EC2 Instance Connect package is properly installed on your instance if you're using a supported Linux distribution.
Troubleshooting steps:
- Try stopping and starting your EC2 instance (not just rebooting)
- Double-check your security group's inbound rules to ensure they allow traffic from the EC2 Instance Connect IP range for your region
- Verify your VPC and subnet configurations for proper internet connectivity
- Try using AWS Systems Manager Session Manager as an alternative connection method
- Clear your browser cache and cookies completely
Since you can connect using other methods from the same laptop, the issue is likely related to how the browser-based EC2 Instance Connect feature interacts with your specific network or browser configuration.
Sources
I am not able to connect my instances by clicking the connect button. | AWS re:Post
EC2 Instance Connect cannot connect to my instance ! | AWS re:Post
Port 22 (SSH) is not authorized | AWS re:Post
For a start, what Linux OS are you running?
EC2 Instance Connect (EIC) has some prerequisites
Hi MikeLim!
Below are my observations and Point 3 and 4 are very important!
These are the below steps I had taken to resolve the issue but still I was not able to ssh ec2 instance using the connect button.
- I am on free tier of AWS and I am logging in AWS management console as root user and not IAM.
- My Host OS is Windows 11 Pro edition.
- I created and deployed an application on an ec2 instance (Ubuntu OS latest 24 edition available in free tier). I am not able to ssh it using the connect button in the AWS management console. But I am able to SSH the same ec2 instance from another laptop/machine when I press the connect button. This implies that there is no problem in the security group, inbound rules, network configurations, VPC and instance status.
- In order to mitigate the browser issue. I installed another browser (firefox) with default settings and also enabled pop ups in it. Still I was not able to ssh ec2 instance from the newly installed bowser.
- I also uninstalled my kaspersky antivirus and also mobaxterm, Restarted my laptop and still I was not able to ssh ec2 instance from the browser using the connect button.
- I am able to ssh ec2 instance from my CMD but not through the browser.
I request amazon team to please look into this issue and help me to connect to ec2 instance from the browser as it is more convinient then connecting from any 3rd party tool. I really don't have any clue what is causing this issue.
Relevant content
- AWS OFFICIALUpdated 2 years ago

Hello Team,
These are the below steps I had taken to resolve the issue but still I was not able to ssh ec2 instance using the connect button.
I request amazon team to please look into this issue and help me to connect to ec2 instance from the browser as it is more convinient then connecting from any 3rd party tool.