Lab 1: Set Up
Task 1: Generate SSH Key
- Open Cloud Shell
- mkdir .ssh
- cd .ssh
- ssh-keygen -b 2048 -t rsa -f <<sshkeyname>>
- ls
- cat <<sshkeyname>>.pub
- copy the public key and private keys and save for later
Task 2: Set up Instances
- Create a compartment
- Navigate to Identity & Security and select Compartments
- Click create compartment
- Name the Compartment Demo and click create compartment
Task 3: Create a VCN with public and private subnets --Using Wizard
- Navigate to Networking and select Virtual cloud networks
- Select Start VCN Wizard
- Name VCN Demo_VCN
- Select Demo compartment
- Leave all other inputs as the default
- Click next
- Review and hit the Create button to create the VCN
- Click the View Virtual Cloud Network button
Task 4: Create Public Compute Instance
- Navigate to Compute and select Instances
- Select Create instance
- Name instance BastionHost
- Ensure it is in Demo compartment
- Ensure it is in public subnet
- Paste public keys and paste the public key we created earlier
- Press create button to create instance
- Create instance
Task 5: Create Private Instance
- Name instance private-1
- Select private subnet
- Select paste public keys and paste the public key we created earlier
- Create instance
Lab 2: Secure Shell Access to Bastion Host using CLI
Task 1: SSH into Instances
- Open Cloud Shell
- cd .ssh
- ssh -i <private_ssh_key> opc@<BastionHost_public_ip_address>
- cd .ssh
- vim private_key
- Paste private key we saved from earlier
- :wq!
- chmod 600 private_key
- ssh -i private_key opc@<private-1_private_ip_address>
- exit