Connect to an instance

更新时间:
复制 MD 格式

ENS supports multiple methods to connect to instances, including SSH, VNC, SSH key pairs, and Workbench. Choose a method based on the operating system and your requirements.

Prerequisites

  • For SSH connections, the instance security group allows inbound traffic on port 22.

  • You have the administrator account and password. If forgotten, reset the password.

Connect using a public IP address

  1. Log on to the ENS console.

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

  3. In the Actions column of the target instance, click Details.

  4. On the instance details page, click View Configurations to get the public IP address of the instance.

  5. Use a remote connection tool to connect. The following example uses PuTTY on Windows to connect to a Linux instance.

    1. Download and install PuTTY.

    2. Start PuTTY.

    3. Configure the settings to connect to the Linux instance.

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

      • Port: Enter 22.

      • Connection Type: Select SSH.

      • Saved Sessions: (Optional) Enter a session name and click Save to store the connection for reuse.

    4. Click Open.

      On first connection, PuTTY displays a security alert. Click Yes to accept the server's certificate and save it to the local registry.

    5. Enter your username and password when prompted.

Connect using VNC

Note
  • If remote tools cannot connect, use VNC to log on and check the operating system status.

  • VNC sessions time out after 300 seconds of inactivity. Reconnect if disconnected.

  1. Log on to the ENS console.

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

  3. In the Actions column of the target instance, click Remote Logon.

  4. In the Remote Logon dialog box, click Log On Now.

  5. Log on to the operating system.

    Linux instances

    1. Enter a username (for example, root or ecs-user), and then press Enter.

    2. Enter the password for the instance, and then press Enter.

      Note

      The password is not displayed as you type. Ensure you enter it correctly.

      Linux supports up to 10 VNC terminals (default: CTRL+ALT+F1). To switch terminals, click in the upper-left corner.

    Windows instances

    1. In the upper-left corner of the page, click .

    2. Select a user account (the default is Administrator), enter the instance password, and press Enter.

Note

To copy long text (such as a download URL) from your local device to the instance, use Copy Command Input.

  1. Log on to the instance via VNC.

  2. In the upper-left corner of the interface, click Copy Command Input.

  3. In the Text Content dialog box, enter the text to copy and click OK.

FAQ

Linux connection issues

  • If you cannot connect to a Linux instance, verify it is in the Running state.

  • Use VNC as an alternative connection method.

VNC black screen

A black screen indicates the system is asleep:

  • Linux: Press any key to wake the system.

  • Windows: If a persistent black screen appears, click to reach the logon screen.

Console VNC is inaccessible

Use browser developer tools to troubleshoot. In Chrome, press F12 and check the Console tab for errors.

Connect using an SSH key pair

  • SSH key pairs use public-private key cryptography for password-free remote logon to Linux instances. This method suits automated operations such as server configuration and application deployment.

  • To use key pair authentication: create a key pair, attach it to the instance, then connect with the private key.

Limitations

  • The maximum length of a key pair is 1,024 bytes.

  • This feature is supported only for Linux instances.

  • Only instances of the x86 compute, heterogeneous virtual machine, and ARM compute types are supported.

  • Key pair authentication disables password-based logon for the instance.

  • Only one key pair can be attached per instance. Attaching a new key pair replaces the existing one.

Create a key pair

  1. Log on to the ENS Management Console.

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

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

  4. Enter a name for the key pair.

  5. Select a Creation Mode. You can choose Automatically Create Key Pair or Import Key Pair.

    1. Automatically Create Key Pair: The system generates a key pair and downloads the private key automatically. Save this file securely — it cannot be downloaded again.

    2. Import Key Pair: Import an existing Base64-encoded public key.

  6. Click OK. The private key file (key_pair_name.pem) downloads automatically.

Attach a key pair

Note

After attaching or detaching a key pair, restart a Running instance or start a Stopped instance for the change to take effect.

  1. Log on to the ENS Management Console.

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

  3. On the Key Pair List page, click Attach in the Actions column of the target key pair.

  4. In the Attach Key Pair dialog box, select the instance to which you want to attach the key pair.

  5. Click OK.

  6. Restart or start the ENS instance for the change to take effect.

Delete a key pair

Note

Ensure the key pair is not attached to any instances before deletion.

  1. Log on to the ENS Management Console.

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

  3. On the Key Pair List page, click Delete in the Actions column of the target key pair.

  4. In the Delete Key Pair dialog box, confirm the key pair details.

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

Connect using Workbench

Workbench is an Alibaba Cloud browser-based tool for password-free connections to ENS instances. It supports text copying, multi-user logon, and a visual file browser.

Limitations

  • The instance is in the Running state with the OS fully booted.

  • The instance has a public IP address or Cloud Assistant installed.

Log on to a Linux instance by using Workbench.

Reset instance password

Note
  • Two reset options are available: Reset Password and Reset Instance.

  • Reset Password: Requires a restart (Running instances) or start (Stopped instances) to take effect.

  • Reset Instance: Supported only for stopped bare metal instances (not heterogeneous ARM types). Also resets the image.

  1. Reset the password:

    1. Log on to the ENS Management Console.

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

    3. On the Instance Management page, find the target instance. In the Actions column, choose Instance Settings > Reset Password.

    4. In the Reset Password dialog box, set the New Logon Password and click OK.

  2. Reset the instance:

    1. Log on to the ENS Management Console.

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

    3. On the Instance Management page, find the target instance. In the Actions column, choose Instance Settings > Reset Instance.

    4. In the Reset Instance dialog box, set the Change Password, and then click OK.