4.9. Managing SSH Keys

Use of SSH keys allows you to secure SSH access to virtual machines. You can generate a key pair on a client from which you will connect to VMs via SSH. The private key will be stored on the client and you will be able to copy it to other nodes. The public key will need to be uploaded to Acronis Cyber Infrastructure and specified during VM creation. It will be injected into the VM by cloud-init and used for OpenSSH authentication. Keys injection is supported for both Linux and Windows virtual machines.

Note

You can specify an SSH key only if you deploy a VM from a template or boot volume (not an ISO image).

Before using the SSH keys feature, make sure the following requirements are met:

  • The cloud-init utility is installed in a VM template or boot volume.
  • OpenSSH Server is installed in a Windows template or boot volume.

For the instructions on preparing templates or boot volumes, see the “Creating SSH-Enabled Templates” section of the Administrator’s Command Line Guide.

To add a public key, do the following:

  1. Generate an SSH key pair on a client using the ssh-keygen utility:

    # ssh-keygen -t rsa
    
  2. On the Compute > Virtual machines > SSH KEYS tab, click Add key.

  3. In the Add SSH key window, specify a key name and copy the key value from the generated public key located in /root/.ssh/id_rsa.pub. Optionally, you can add a key description.

    ../_images/stor_image101_ac.png

To delete one or more keys, select them and click Delete.

Note

If a key has been injected into one or more VMs, it will remain inside those VMs even if you delete it from the admin panel.