Digital-Asset-Developer-Resources / aws

AWS required enviroment
GNU General Public License v3.0
0 stars 2 forks source link

Create Security Group #3

Closed kenricnelson closed 4 years ago

kenricnelson commented 4 years ago

I was able to get the Algorand AMI running; however, upon trying to connect to the server via SSH I received the following error:

command: ssh -i ec2-keypair.pem kenricnelson@ip_address note: not showing the ip address

error message: Connection closed by ip_address port 22

In the Python Script "AWS VPC" there is a section regarding the security group, which appears to need a revision to setup the SSH and other protocols properly. Currently the script is:

`# Create security group sec_group = ec2.create_security_group( GroupName=SECURITYGROUP_NAME, Description='Allow SSH, HTTP and HTTPS', VpcId=vpc.id)

sec_group.authorize_ingress( GroupId=sec_group.id, IpPermissions=[ {'IpProtocol': 'tcp', 'FromPort': 80, 'ToPort': 80, 'IpRanges': [{'CidrIp': '0.0.0.0/0'}]}, {'IpProtocol': 'tcp', 'FromPort': 443, 'ToPort': 443, 'IpRanges': [{'CidrIp': '0.0.0.0/0'}]}, {'IpProtocol': 'tcp', 'FromPort': 22, 'ToPort': 22, 'IpRanges': [{'CidrIp': '0.0.0.0/0'}]} ])

` Is some further specification needed to insure each of the ports (80, 443, 22) is configured properly and operational?

kenricnelson commented 4 years ago

AWS instructions suggested using Ubuntu as the user for the SSH connection

ssh -i ec2-keypair.pem ubuntu@ip_address

However, this resulted in ssh: connect to host ip_address port 22: Operation timed out

kenricnelson commented 4 years ago

Using ec2-kenricnelson@ip_address also produced "Operation timed out"

StephenHarrington commented 4 years ago

Hey Kenric,

I’m away until after Christmas, not much computer access, so hard to figure out. I’d recommend deleting everything thru the UI and starting over.

Steve

On Dec 22, 2019, at 12:21 PM, Kenric Nelson notifications@github.com wrote:

 Using ec2-kenricnelson@ip_address also produced "Operation timed out"

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

kenricnelson commented 4 years ago

Steve,

Have a Merry Christmas. We can talk when you get back. It seems like a simple error related to getting the user name correct; however, I've tried launching several instances and several different possibilities for the username.

Kenric

StephenHarrington commented 4 years ago

User is ubuntu@ipAddress

On Dec 22, 2019, at 12:32 PM, Kenric Nelson notifications@github.com wrote:

 Steve,

Have a Merry Christmas. We can talk when you get back. It seems like a simple error related to getting the user name correct; however, I've tried launching several instances and several different possibilities for the username.

Kenric

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

kenricnelson commented 4 years ago

I resolved the issue. During the creation of the Instance, I had not created and mounted a file system. I followed the instructions for creating the NFS (recommended for Ubuntu). With this completed the SSH connection worked and I was able to follow the instructions to mount the NFS.

I will close this issue.