To verify that your infrastructure components have been set up appropriately, use the Oracle Cloud Infrastructure Console to view the components that have been created. You can also use SSH to connect to the bastion hosts, which are created in public subnets.
Viewing all the components in your compartment using the Oracle Cloud Infrastructure Console allows you to verify that components have been created in the appropriate subnets and Availability Domains. You can also view details of each component, including the IP addresses of instances, ingress and egress security rules, and so on.
Connecting to the bastion hosts using SSH verifies that your SSH keys have been generated and used correctly and that the bastion hosts are set up to be accessible with SSH over the public internet.
Verify that Infrastructure Components Are Created
Use the Oracle Cloud Infrastructure Console to view the components that were created. You can also view detailed information about each of the components.
- Sign in to the Oracle Cloud Infrastructure Console.
- Click Networking and then click Virtual Cloud Networks to view the VCN in your compartment.
- Click the VCN to view other networking components including subnets, route tables, security lists, the service gateway, and load balancers.
- Click Compute and then click Instances to view the instances in your compartment.
- Click any instance to view details including the subnet, public and/or private IP addresses, and the boot volumes associated with the instance.
- Under Database, click Bare Metal, VM, and Exadata to view the DB Systems in your compartment.
- Click any DB System to view details including its nodes, databases, edition, storage, IP address and so on.
- Click File Storage to view the file systems in your compartment.
- Click any file system to view its mount target.
Verify the SSH Connection to the Bastion Host
To verify that your SSH keys have been generated used appropriately and that the security lists have been set up correctly to enable SSH access, verify that you can connect to the bastion hosts from your local system using SSH.
- Find out the public IP address of the bastion host that you want to connect to. The
terraform applycommand shows the public IP address of the bastion host in the success message. If you didn’t make a note of the public IP address of the bastion hosts when this command completed, you can view the bastions hosts in the Oracle Cloud Infrastructure Console to find out the public IP address.
- If your local system is a Linux or UNIX-like system, navigate to the directory where you saved your SSH key pair and enter:
ssh -i ./<private_key_name> opc@<public_ip_address_of_bastion_host>You’ll be prompted to confirm that you want to connect to this host. Enter
yes.The IP address is added to the list of known hosts and a secure connection is established.
- If your local system is a Windows system:
- Start PuTTY.
- In Host Name (or IP address) field, enter the public IP address of your instance.
- Confirm that the Connection type option is set to SSH.
- In the Category tree, expand Connection and then click Data.
- In the Auto-login username field, enter opc.
- In the Category tree, expand SSH and then click Auth.
- Click the Browse button next to Private key file for authentication. Select the SSH private key that you generated earlier.
- In the Category tree, click Session.
- Click Open to open the connection.You’ll be prompted to confirm the public key. Click Yes.. A secure connection to the bastion host is established.
- If multiple bastion hosts are created, you can repeat these steps to confirm that you can connect to the other bastion hosts as well.