EnergeticBlue
EnergeticBlue

Reputation: 17

SSH to Aws Ec2 instances without Public, Private Keys and Public Ips

In my company one of the coworker created Ec2 instance without public IP address. I don't have public and private keys. i can make connection with SSM Manager or EC2 Instance Connect Endpoint but i wanna make connection with my local. How can i do that ?

i need to ssh in our private ec2 instance without pub/private keys.

Upvotes: -1

Views: 619

Answers (1)

Caldazar
Caldazar

Reputation: 3812

Your instance doesn't have a public IP. You don't have a key-pair for the instance. These are 2 reasons why you can't connect to that instance via ssh.

Still, you can connect to your instance from your local machine. You already mentioned that you can use SSM. So, to connect from your local machine, you can use AWS CLI with Session Manager plugin. This way, you don't need to add public IP to your instance, don't need to open ssh port and no need to juggle with ssh keys.

Here are instructions on how to install the plugin, depending on your operating system.

Obviously, like for AWS CLI regular usage, you need access key and secret access key.

With Session Manager plugin, you can also use port forwarding which I assume was the main reason you were actually looking to have ssh access from local machine.

Upvotes: 2

Related Questions