Home > Blockchain >  EC2 Instance cannot connect to github using SSH
EC2 Instance cannot connect to github using SSH

Time:10-16

I'm trying to deploy a web with Laravel Forge and AWS. I created an EC2 instance using Laravel Forge control panel. I created a security group for this instance.

Outbund rules

Inound rules v1 Inbound rules v2

All SHH connections allowed are described in this Laravel Forge guide: https://forge.laravel.com/docs/1.0/servers/providers.html

So, the problem is when I try to install the repository I get this error into EC2 instance.

SHH error

I also checked that my instance's SHH public key is registered in my github account

CodePudding user response:

Your Outbound rules are permitting connections on port 80 (HTTP) and port 443 (HTTPS).

However, SSH uses port 22. This is causing the connection to fail.

You should add port 22 to the Outbound rules.

However, it is generally considered acceptable to Allow all outbound connections from an Amazon EC2 instance since you can 'trust' the software running on the instance. I would recommend allowing all outbound connections rather than restricting it to specific ports.

  • Related