8.7.2.2. Manage static keys
You can add a statically managed public SSH key when you create a virtual machine (VM) by using the OpenShift Container Platform web console or the command line. Save the key to a project to add it automatically to every VM that you create there.
You can also add a public SSH key to a project when you create a VM by using the web console. The key is saved as a secret and is added automatically to all VMs that you create.
If you add a secret to a project and then delete the VM, the secret is retained because it is a namespace resource. You must delete the secret manually.
8.7.2.2.1. Add a static SSH key by using the web console 링크 복사링크가 클립보드에 복사되었습니다!
You can add a statically managed public SSH key to a virtual machine (VM) in the creation wizard of the OpenShift Container Platform web console. The key is added at first boot and does not affect the cloud-init user data.
You can also save the key to the project as a secret so that it is added automatically to the VMs that you create in the project.
Prerequisites
-
You generated an SSH key pair by using the
ssh-keygencommand.
Procedure
- In the OpenShift Container Platform web console, start creating a VM by using the creation wizard until you reach the Customization page.
- Click the SSH tab.
- Beside Public SSH key, click Edit.
Select one of the following options:
- Use existing: Select a secret from the secrets list.
Add new: Add a key by performing the following steps:
- Browse to the public SSH key file or paste the file in the key field.
- Enter the secret name.
- Optional: Select Automatically apply this key to any new VirtualMachine you create in this project.
- Click Save.
- Complete the remaining wizard steps to create the VM.