localstack/docs

ssh to ec2 mock

drofmij opened this issue · 4 comments

"Assuming the instance is available under 127.0.0.1:12862 (as per the LocalStack log output)"
my log output does not give me any reference to the ec2 launch with regards to ports, I have no idea what port to use here and the docs read like a math text book. "Assume that the earth is a sphere with diameter of 4000 miles..."

How would I go about finding out this port and how would I be able to connect ssh to the ec2 "instance".

https://docs.localstack.cloud/user-guide/aws/ec2/

Once the instance is up and running, we can use the ssh command to set up an SSH connection. Assuming the instance is available under 127.0.0.1:12862 (as per the LocalStack log output), use this command:

ssh -p 12862 -i key.pem root@127.0.0.1

Hi @drofmij — Which edition of LocalStack are you using? Are you using the community image or the Pro image? :)

@drofmij Community edition doesn't support SSH access to mocked EC2 instances, since there is no emulation layer at all. With Pro image, we spin Docker containers that mimic the EC2 instances, and you can SSH to them.

This should be hopefully fixed with #1132 :)