Skip to content

Access to Linux Instance

0

I am trying to gain access to my linux instance. I have lost contact with the developer to ask him to show me how to gain access. I am logged into ASW and can see the instance. When I try and connect to the server using terminal (Mac) I get the error - permission denied (public key).

What steps would be best to gain access to the server which is currently running? There is a key pair assigned at launch it says on the status of the instance.

1 Answer
2

Hello.

How about trying connecting using EC2 Instance Connect?
If the OS is compatible with EC2 Instance Connect, you can configure it and connect from the management console.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-methods.html

Alternatively, you may be able to use Systems Manager Session Manager.
This requires setting up an IAM role with the necessary IAM policy attached to EC2, but it can be accessed from the management console without using a key pair.
https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-prerequisites.html

EXPERT
answered 2 years ago
EXPERT
reviewed 2 years ago
EXPERT
reviewed 2 years ago
  • Thanks, if I use the EC2 instance connect I get the following error message - Failed to connect to your instance Error establishing SSH connection to your instance. Try again later.

  • By the way, just to be sure, try changing the permissions of the key pair stored in MacOS using the command below.

    chmod 400 /Users/xxxx/.ssh/xxxx.pem
    

    When connecting with EC2 Instance Connect, you need to check whether the prerequisites listed in the following document are met. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-prerequisites.html

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.