tencent cloud

Feedback

Managing SSH Keys

Last updated: 2024-01-08 09:41:35

    Scenarios

    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.
    Caution:
    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 Create secret.
    3. In the Create an SSH key pop-up window, configure the key.
    
    
    Creation Method:
    Create a new key pair: Enter a key name
    Import existing public keys: 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.
    4. Click OK.
    Note:
    After clicking OK, the private key is automatically downloaded. Tencent Cloud will not retain your private key. If you lost the private key, create a new one and bind it with the instance again.

    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.
    Deleting one key
    Batch deleting keys
    1. Click Delete in the row of the target SSH key.
    
    
    2. In the key deletion pop-up window, click OK.
    1. Select the target keys and click Delete at the top of the page.
    2. In the key deletion pop-up window, click OK.
    Only deletable ones of the selected key pairs will be deleted.
    
    
    

    Relevant operations

    Using an SSH key to log in to a Linux CVM

    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