tencent cloud

Feedback

Managing SSH Keys

Last updated: 2022-09-01 17:36:39

    Overview

    This document describes common operations related to using SSH key pair to log in to an instance. For example, you can create, bind, unbind, modify, or delete an SSH key pair.

    Note

    An SSH key can only be bound to or unbound from a CVM instance that is shut down. For directions on how to shut down a CVM instance, see Shutting Down Instances.

    Directions

    Creating an SSH key

    1. Log in to the CVM console and select SSH Key on the left sidebar.
    2. On the SSH Key page, click New.
    3. In the Create an SSH key pop-up window, configure the key.
    • Creation Method:
      • If you select Create a key pair, enter the key name.
      • If you select Use an existing public key, enter the key name and existing public key information.
        Note

        You need to use a public key without a password; otherwise, you cannot log in to the instance in the console.

    • Key Name: Customize a name.
    • Tag (Optional): You can add tags for a key as needed, which can be used to categorize, search for, and aggregate resources. For more information, see Overview.
    1. Click OK.
      Note

      After clicking OK, the private key will be automatically downloaded. Tencent Cloud will not retain your private key. Be sure to keep it safe.

    Binding a key to an instance

    1. Log in to the CVM console and select SSH Key on the left sidebar.
    2. On the SSH Key page, click Bind instance in the row of the target key.
    3. In the pop-up window, select the Region and target CVM instance, and click Bind.

    Unbinding a key from an instance

    1. Log in to the CVM console and select SSH Key on the left sidebar.
    2. On the SSH Key page, click Unbind instance in the row of the target key.
    3. In the pop-up window, select the Region and target CVM instance, and click Unbind.

    Modifying the SSH key name or description

    1. Log in to the CVM console and select SSH Key on the left sidebar.
    2. On the SSH Key page, select on the right of the key name.
    3. In the pop-up window, enter the new key name or description, and click OK.

    Deleting an SSH key

    Note

    An SSH key that is bound to a CVM instance or custom image cannot be deleted.

    1. Log in to the CVM console and select SSH Key on the left sidebar.
    2. On the SSH Key page, delete one key or batch delete keys as needed.
      1. Click Delete in the row of the target SSH key.
      2. In the key deletion pop-up window, click OK.

    Using an SSH key to log in to a Linux CVM

    1. Create an SSH key.
    2. Bind an SSH key to a CVM instance.
    3. Log in to a Linux instance via SSH key.

    Editing a key tag

    You can add, modify, or delete a tag for an SSH key in the following steps. For more information on tags, see Overview.

    1. On the SSH Key page, click Edit tags on the right of the key.
    2. In the Edit tags pop-up window, perform the desired operation.
    3. Click OK.
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support