All Products
Search
Document Center

ENS:Connect to an instance

Last Updated:Dec 18, 2024

Edge Node Service (ENS) allows you to connect to an ENS instance by using a third-party tool or Virtual Network Computing (VNC). After you create an ENS instance, you can select an appropriate connection method based on the operating system of the instance and the operations that you want to perform.

Prerequisites

  • Port 22 is open in the inbound rule of the security group if you want to connect to instances over SSH.

  • The administrator username and password that are used to log on to the instance are obtained. If you forget your password, reset the password.

Log on to an instance by using the public IP address of the instance

  1. Log on to the ENS console.

  2. In the left-side navigation pane, choose Computing Capacity and Images > Instances.

  3. Find the instance to which you want to log on and click View Details in the Actions column.

  4. On the instance details page, click View Specifications to obtain the public IP address of the instance.

  5. Log on to an instance over SSH. In this topic, PuTTY is used as an example to describe how to log on to a Linux instance from an on-premises Windows computer over SSH.

    1. Download and install PuTTY.

    2. Start PuTTY.

    3. Configure the parameters that are required to connect to the Linux instance.

      • Host Name (or IP address): Enter the public IP address of the ENS instance.

      • Port: Enter 22.

      • Connection type: Select SSH.

      • Saved Sessions: Optional. The name of the session. Click Save to save the session. The next time you log on to the instance, you do not need to enter information such as the public IP address of the instance.

    4. Click Open.

      The first time you log on to an instance, PuTTY asks you whether to accept the security certificate of the server. Click Yes to save the certificate to the local registry.

    5. After you establish an SSH connection to the instance, enter the username and password as prompted to log on to the instance.

Log on to an instance by using VNC

  • If you cannot connect to an instance over SSH, you can connect to the instance by using VNC. Then, you can view the status of the instance in real time.

  • By default, a VNC connection session lasts for 300 seconds. If you do not perform operations within 300 seconds, the connection to the instance is automatically closed. You must reconnect to the instance.

  1. Log on to the ENS console.

  2. In the left-side navigation pane, choose Computing Capacity and Images > Instances.

  3. Find the instance to which you want to log on and click Remote Logon in the Actions column.

  4. In the dialog box that appears, click Log On.

  5. Log on to the instance operating system.

    Linux instances

    1. Enter a username, such as root or ecs-user, and press the Enter key.

    2. Enter the logon password of the instance and press the Enter key.

      Note

      The characters of the password are hidden when you enter the password for the Linux instance. Make sure that you enter the correct password.

      You can switch between up to 10 different VNC management terminals when you connect to the Linux instance. The default terminal is CTRL+ALT+F1. For example, you can choose Send Remote Commands > CTRL+ALT+F2 to switch to CTRL+ALT+F2.

    Windows instances

    1. In the upper-left corner of the page that appears, choose Send Remote Commands > CTRL+ALT+DELETE.window按键

    2. Select an account, enter the logon password for the instance, and then press the Enter key. The default account for Windows instances is Administrator.

Note

If you want to copy a long text, such as a download URL, from your computer to an instance, you can use the command copy feature.

  1. Connect to the instance by using VNC.

  2. In the upper-left corner of the interface, click Enter Copy Commands.

  3. In the Copy and Paste Commands dialog box, enter the content that you want to copy to the instance and click OK.

FAQ

What do I do if I cannot connect to a Linux instance?

  • If you cannot connect to or log on to a Linux instance, check the status of the instance. You can log on to only instances that are in the Running state.

  • You can also log on to an instance by using VNC.

What do I do if a black screen appears when I connect to an instance by using VNC?

A black screen indicates that the instance is in sleep mode. Perform the following operations based on your operating system:

  • For a Linux instance, click your mouse or press any key to activate the instance and go to the logon page.

  • For a Windows instance, choose Send Remote Commands > CTRL+ALT+DELETE in the upper-left corner to go to the logon page.

What do I do if I cannot access a VNC management terminal?

You can use a browser to access the VNC management terminal for troubleshooting. For example, you can use Google Chrome to access the VNC management terminal, and press the F12 key to open the developer tools panel. Then, click the Console tab and identify errors based on the information that is displayed.

Log on to an instance by using a key pair

  • Alibaba Cloud provides the secure and convenient SSH key pair-based authentication method for logon to ENS instances. The key pairs are used for authentication and encrypted communication over the SSH protocol. An SSH key pair consists of a public key and a private key and can be used only on Linux instances. This meets your business requirements for higher security, convenience, and automation. With SSH key pairs, you can implement password-free remote logon and perform secure automated operations, such as server configuration and application deployment.

  • You can use an SSH key pair that is bound to a Linux instance to log on to the instance. You can specify an SSH key pair when you create an instance, or bind an SSH key pair to an instance after the instance is created. Then, you can use the private key to connect to the instance.

Limits

  • Key pairs apply only to Linux instances.

  • Key pairs apply only to the following instance families: x86-based computing instance, heterogeneous VM, and ARM-based computing instance.

  • If you use an SSH key pair to log on to a Linux instance, the username/password-based authentication method is disabled to increase security.

  • When you bind SSH key pairs to Linux instances in the ENS console, you can bind only a single SSH key pair to a Linux instance. If a key pair is already bound to the instance, the new key pair replaces the original key pair on the instance.

Create a key pair

  1. Log on to the ENS console.

  2. In the left-side navigation pane, choose .

  3. On the Key Pairs page, click Create Key Pair.

  4. Enter a key pair name.

  5. Configure the Creation Mode parameter. Valid values: Automatically Create Key Pair or Import Key Pair.

    1. Automatically Create Key Pair: The system automatically creates a key pair. The private key is automatically downloaded after the key pair is created. The private key can be downloaded only once. You must securely store the private key file.

    2. Import Key Pair: You can import a Base64-encoded public key.

  6. Click OK. After you create a key pair, your browser downloads the private key file (Key pair name.pem) to your computer.

Associate a key pair

  1. Log on to the ENS console.

  2. In the left-side navigation pane, choose .

  3. On the Key Pairs page, find the key pair that you want to associate and click Associate in the Actions column.

  4. In the Associate Key Pair dialog box, select the instance with which you want to associate a key pair.

  5. Click OK.

  6. Start or restart the instance for the setting to take effect.

Delete a key pair

Note

Make sure that the SSH key pair that you want to delete is not bound to an ENS instance.

  1. Log on to the ENS console.

  2. In the left-side navigation pane, choose .

  3. On the Key Pairs page, find the key pair that you want to delete and click Delete in the Actions column.

  4. In the Delete SSH Key Pair message, check the key pair information.

  5. After you confirm that the key pair information is correct, click OK.

Reset the password of an instance

Note
  • You can directly reset the password of an instance or reset the password by resetting the instance.

  • Reset the password: You can reset the password only for x86-based computing instances, ARM-based computing instances, and heterogeneous virtual machines (VMs) that are in the Running or Stopped state. After you reset the password of an instance, you need to restart the instance in the ENS console for the reset to take effect.

  • Reset the instance: You cannot reset heterogeneous ARM-based instances. You can reset only physical machines and bare metal instances that are in the Stopped state. You can reset the password only when you reset the image.

  1. Reset the password:

    1. Log on to the ENS console.

    2. In the left-side navigation pane, choose Computing Capacity and Images > Instances.

    3. On the Instances page, find the instance that you want to manage, click the vertical ellipsis icon in the Actions column, and then click Reset Password in the Instance Settings section.

    4. In the Reset Password dialog box, enter and confirm a new valid password and then click OK.

  2. Reset the instance:

    1. Log on to the ENS console.

    2. In the left-side navigation pane, choose Computing Capacity and Images > Instances.

    3. On the Instances page, find the instance that you want to manage, click the vertical ellipsis icon in the Actions column, and then click Reset Instance in the Instance Settings section.

    4. In the Reset Instance dialog box, set a new password, and click OK.