Emma Heinle
1 month
Stefan Xenopol
5 months
Andreas Vöst
11 months
Andreas Vöst
1 year
Emma Heinle
1 year
Kim Klotz
1 year

AWS connect to an EC2 serial console via aws cli

Posted . Visible to the public.

To connect to the serial console of an EC2 instance, you can use the aws cli.

  1. Add your public ssh key to the serial console connector
aws ec2-instance-connect send-serial-console-ssh-public-key \
  --instance-id <instance-id> \
  --serial-port 0 \
  --ssh-public-key file:///home/foo/.ssh/my_key.pub \
  1. Connect to the serial console
ssh <instance-id>.port0@serial-console.ec2-instance-connect.<region>.aws

Keep in mind, the SSH Key is only valid for a short time. You can still only have 1 serial connection. If you have the console opened in the browser, you have to close it first.

Last edit
Kim Klotz
License
Source code in this card is licensed under the MIT License.