Public cloud platforms and related account options change…
Question Answered step-by-step Public cloud platforms and related account options change… Public cloud platforms and related account options change frequently. While the instructions given here were accurate at the time of writing, you might need to adjust the steps or options according to later changes.In Project 2-3, you created a VM instance in AWS. In Project 2-4, you worked with Azure, and in Project 2-5, you launched a VM in GCP. In this project, you’ll connect to those VMs. Normally we cover AWS first, then Azure, and finally GCP. In this case, we’re going to reverse this order because connecting to VM instances in GCP is very simple compared to the others. GCP allows you to connect to VMs directly through the browser.Connect to GCP InstanceAlthough it’s possible to use a separate SSH (Secure Shell) client to connect to your GCP instance, it’s easy to connect directly through your browser (see Figure 2-29). If you have trouble connecting with your VM instance, view the network interface details and make sure the firewall rules allow SSH traffic (see Figure 2-30).Figure 2-29 To connect to a running VM instance, connect through a browser window, use the gcloud command, or use a third-party SSH clientSource: Google LLCFigure 2-30 By default, ICMP, RDP, SSH, and internal traffic are allowed into VM instances, and all traffic is allowed out of the VM instanceSource: Google LLCComplete the following steps:Make sure your instance is running. Under Connect, click the SSH drop-down arrow to see the options you have, and then click Open in browser window. Note that in the future, you can click SSH to go straight to the new tab in your browser.When the VM’s connection opens, interact with it by running some Linux commands. Which commands did you run? End the connection by entering the exit command.Delete the instance.Connect to Azure InstanceIn Azure, you can also use SSH to connect to your Linux VM. You created a Windows VM in Project 2-4, so for this project, you’ll use RDP (Remote Desktop Protocol) to connect to the instance. This process is particularly simple and straightforward when using Azure from a Windows computer.Complete the following steps:Make sure your instance is running. Click the ellipsis icon, and then click Connect.Download and then open the RDP file. If required, click Connect and then click Yes to continue. Sign in using the credentials you created in Project 2-4.When the RDP connection is established, interact with your VM’s apps, utilities, or other resources. What tasks did you perform? Disconnect from the VM, and then delete the instance.Click Resource groups and delete the resource group you created in Project 2-4.Connect to AWS InstanceConnecting to a Linux instance using an SSH client is more complicated than what you’ve seen so far. If you’re working from a Linux computer, you’ll need to use SSH (Secure Shell) to connect to your VMs. If you’re using a Windows computer, you can use PuTTY, which is a free and open-source terminal emulator, or WSL (Windows Subsystem for Linux), which is the embedded Linux shell in Windows 10, to connect to Linux VMs. If you don’t have PuTTY on your computer, you can download it from putty.org, as shown in Figure 2-31. Had you created a Windows VM, you could instead use RDP (Remote Desktop Protocol) from a Windows computer.Figure 2-31 Download and install the latest version of PuTTYSource: Simon TathamThese instructions apply to PuTTY on a Windows computer. If you’re using a different SSH client, the steps will be similar. Complete the following steps:Use PuTTYgen (see Figure 2-32) to convert the private key file from .pem to .ppk. Choose the RSA key type, and be sure to save the private key.Figure 2-32 Load the existing key file, and then save it using the .ppk file formatSource: Simon TathamMake sure your instance is running, and check its security group to ensure that SSH traffic is enabled for the instance. Collect needed information, including the public IPv4 address and the default username. For example, the default username for an Ubuntu VM is ubuntu. Common default usernames are listed in Table 2-2. Note that some OSs have multiple default username possibilities. What is the default username for your VM? Table 2-2 Common default usernamesDefault usernameOperating systemsec2-userAmazon Linux, Red Hat Linux, SUSE LinuxrootRed Hat Linux, SUSE Linux, Debian LinuxubuntuUbuntu LinuxadminDebian LinuxfedoraFedora LinuxcentosCentOS LinuxIn the PuTTY application, add the default username and the public IPv4 address in the following format without the brackets: [username]@[ipaddress] Make sure the port is 22 and SSH is selected as the connection type. In the left pane, expand SSH and click Auth. Select the private key file for authentication; then click Open. In the security alert dialog box, click Yes to add your private key to PuTTY’s cache.NOTEIf the connection with your VM is not successful, you’ll need to do some troubleshooting. For example, make sure your local firewalls (both on your network and on your physical computer) allow SSH traffic, and make sure your VM instance allows SSH traffic from the local IP address of your physical network. Make sure you used the correct private key file and that it was formatted using the correct file type. Make sure you typed the default username and the public IPv4 address of your VM correctly.When the SSH connection is established, interact with your VM’s apps, utilities, or other resources. What tasks did you perform? Disconnect from the VM, and then terminate the instance. Engineering & Technology Computer Science CSC 227 Share QuestionEmailCopy link Comments (0)


