Open topic with navigation

# Retrieving the Bastion Public IP

The bastion host provides the only access to the VPC and its resources. Therefore, you will need to know how to connect to it through its public IP address.

To retrieve the bastion public IP address using the Web UI:

1. On the View Instances page, select the bastion instance.

1. On the Description tab, locate the public IP address.

1. Record the bastion public IP address in the AWS worksheet.

To retrieve the bastion public IP address using the CLI:

1. Run the following command:
   `aws ec2 describe-instances \
   --instance-ids <Instance Id> | jq -r '.Reservations[].Instances[].PublicIpAddress'`
2. Record the bastion public IP in the AWS worksheet.

Example input and output:

`aws ec2 describe-instances \
--instance-ids i-06773a3ef6acd24f0 | jq -r '.Reservations[].Instances[].PublicIpAddress'`

    18.184.151.208

Next Step: Connect to Bastion and Install Software Packages