Access an Instance

Background Information

After creating elastic compute instances, you need to remote control and manage them. Several remote access methods are listed below.

  • RDP (Remote Desktop Protocol) RDP is a remote desktop protocol commonly used for remote management of Windows operating systems. You're recommended to remote connect to a Windows virtual machine via RDP.

  • SSH (Secure Shell) SSH is a command-line based remote management tool that uses a secure network protocol. SSH is widely used in UNIX-like operating systems, including Linux, BSD, and macOS. You're recommended to use Terminal or Windows PowerShell to establish an SSH connection to non-Windows virtual machines.

  • RFB (Remote FrameBuffer) RFB is a protocol used for graphical remote management. VNC (Virtual Network Computing) is a common remote graphical management tool based on the RFB protocol used in UNIX-like operating systems. VNC login provides a graphical desktop environment, allowing you to interact with the virtual machine visually. VNC protocol is also widely supported across multiple operating systems and platforms, which is more flexible and compatible. You're recommended to remotely access and control the graphical interface of your virtual machines via VNC.

These protocols and tools offer various ways to remotely access and manage your instances. RDP provides a graphical interface for Windows instances; SSH offers a command-line interface for remote management of UNIX-like instances, and VNC enables graphical remote management of instances regardless of operating systems.

Note

  • Your machine will be associated with one security group at least while being created. To remote access successfully, please ensure the security group allows traffic on the following ports: TCP 22 ( for SSH), TCP 3389 (for RDP), and ICMP port (used for network management and debugging).

  • The steps below may vary depending on the operating system and applications you are using. You may need to use different commands or tools to perform the same actions.

Access a Linux Instance via SSH Key Pair

When you need to access a Linux instance, you can use SSH. Assume a macOS Terminal and a Windows PowerShell.

If you have deployed the SSH public key to your server, you can also using the SSH key for authentication without entering a password.

Prerequisites

  • Ensure the instance has SSH enabled and is running.

  • The instance you want to access must has a public IP address unless the accessing computer and the target instance are on the same private network.

Procedures

  1. Open the Terminal application on your macOS computer. You can find it in the Applications > Utilities folder, or you can use Spotlight to search for it.

  2. In the Terminal, use the SSH command along with the IP address of the instance to establish a remote connection. The command syntax is as follows:

    ssh username@ip_address
  3. Press Enter, and Terminal will attempt to establish an SSH connection to the instance. If this is your first time connecting to the virtual machine, you may be prompted to confirm the authenticity of the host by verifying its key fingerprint. Type yes to proceed.

  4. After the SSH connection is successfully established, you will be prompted to enter the password for the selected username on the instance.

  5. Once authenticated, you will have a Terminal session open on your macOS computer, but with the remote instance's command-line interface. From here, you can execute commands and perform administrative tasks on the instance.

Access a Windows Instance via RDP

When you need to access a Windows instance, you're recommended to use RDP.

Prerequisites

  • Ensure that the Windows instance is running and has RDP enabled. RDP is available by default on Windows operating systems.

  • The instance you want to access must has a public IP address unless the accessing computer and the target instance are on the same private network.

Procedures

  1. Open the Remote Desktop client application on your local computer. This application is built into Windows, and you can find it by searching for "Remote Desktop" in the Start menu.

  2. In the Remote Desktop client, enter the public IP address of the instance in the "Computer" field.

  3. Click Connect to initiate the connection.

  4. If prompted, enter the credentials for the user account on the instance.

  5. Once authenticated, the Remote Desktop client will establish a connection to the Windows instance. You will see the instance's desktop displayed on your local computer.

  6. You can now interact with the Windows instance as if you were sitting in front of it. You can run applications, access files, configure settings, and perform any other tasks you would normally do on a Windows desktop.

Remember to ensure that the necessary firewall rules are configured on both the instance and your local machine to allow RDP connections.

Access an Instance via VNC

You can remote access a Linux or Windows instance via VNC.

Prerequisites

The instance you want to access must has a public IP address unless the accessing computer and the target instance are on the same private network.

  1. Go to elastic compute instance list page and click on the desired instance to enter Details page.

  2. Click VNC Access to enter VNC access interface. Wait until it shows:

    Connected (encrypted) to: QEMU (instance-xxxxxxxx)

    Enter the default username, and press Enter, and Terminal will attempt to establish an SSH connection.

  3. Enter the password for the instance.

  4. Once authenticated, the VNC will establish a connection to the instance. You should see the VM's desktop or graphical interface displayed in the VNC client window.

  5. (optional) You can paste your code on the Clipboard and click Run to quick run your command.

Summary

The protocols and access methods mentioned above provide convenience and flexibility in different scenarios. You can choose the way that best suits your needs to remotely access and manage your elastic compute instances, whether it's using a graphical user interface or a command-line interface.

Last updated