Use managed SSH on a VM
Use managed SSH to open a named Linux session in the Kube-DC console or connect with an approved SSH credential. On Kube-DC Cloud and self-hosted installations, availability depends on your Organization and Project. For an existing VM, open Access and check for Managed SSH enabled.
Create a managed VM with a persistent disk
You need current Project membership and permission to create VMs and persistent volume claims. The VM wizard offers managed SSH for supported images when your Project has an approved root snapshot.
- Open Virtual machines and click Create virtual machine.
- Select an operating system. When your Project has an approved managed image, the wizard checks Enable managed SSH and shows Approved managed snapshot as the image source.
- Set CPU, memory, and root disk capacity. Use the storage class and minimum size shown for the selected image. Keep automatic Project networking and start the VM on creation so the guest can enroll.
- Submit the request. Use Check progress to resume the same request until the guest applies its SSH policy. Open the VM and confirm that Access shows Managed SSH enabled.
The platform enrolls the creator as the first SSH administrator. Use the methods shown in Connect after enrollment.
The root disk and its files survive a restart. Use the VM configuration controls to edit CPU, memory, and shutdown grace when your Project role permits the change. The readiness timing controls appear when the VM has a readiness probe. You can expand the root disk on an expandable storage class. After expanding, check whether your guest operating system needs to grow its partition or filesystem to use the new capacity. Review the root disk and data removal before deleting the VM.
Create an ephemeral pilot VM
You need an Organization administrator account, access to the selected Project, and permission to create VMs in it. Check that the Project has enough CPU and memory for the guest and its launcher.
- Select the Project and open Virtual machines.
- Click Create ephemeral VM. Select an image from the sheet and set the name, CPU, and memory.
- Click Request VM. Select Check progress until enrollment finishes. You can reopen the request in the same browser tab.
- Select Open VM access and confirm that Managed SSH enabled appears.
The ephemeral boot disk loses its changes when KubeVirt replaces the VM instance. Use the persistent creation flow for a workload that needs a root disk across restarts. Standard VM creation
Open a browser terminal
- Sign in with your Organization account and select the VM's Project.
- Open the running VM and select Connect.
- Click Open SSH terminal. Run
id -unand compare the result with the Linux username shown under Browser SSH.
If the terminal button is unavailable, confirm the VM is running and check whether your VM grant includes Browser SSH. Ask a VM access administrator to review your effective grant if the method remains unavailable.
Connect with a personal key
You need an approved Public key grant on the VM and a workstation that can reach an address shown in Connect.
- Open Account > SSH keys and select Add public key. Paste an
OpenSSH public key or select its
.pubfile. Keep the private key on your workstation. - Open the VM, select Access > Attach key, and choose the registered key. Registration makes the key available in your Organization. Attaching it applies the key to the selected VM.
- Open Connect. Under From your computer, copy the command for a
reachable address. Use your matching local private key, adding
-i PATH_TO_PRIVATE_KEYif OpenSSH needs to select it explicitly. - Verify the host identity against the SSH host fingerprint shown in Connect. Stop and ask an operator to verify the guest if the fingerprint differs.
A Project network address requires a route to that network. Use the browser terminal or the available CLI certificate relay when you lack that route.
Each person uses their own account and can attach more than one registered key. You can register a replacement, attach and test it, and then detach or retire the old key.
Connect with a CLI certificate
When Connect displays CLI certificate, install the CLI version offered
for your installation and confirm that kube-dc ssh vm --help is available.
Install OpenSSH, sign in to the same Organization, and select the Project
context. Run the command shown in Connect.
kube-dc ssh vm PROJECT_NAME/VM_NAME --relay
Use the Project name shown in the console for PROJECT_NAME and the VM's name
for VM_NAME. If your operator supplies a private CA for the backend, add
--backend-ca-cert PATH_TO_CA_BUNDLE. The CLI requests a short-lived SSH
certificate and verifies the enrolled guest host key.
Use managed SSH from an MCP client
Use an MCP session signed in as your own user in the VM's Organization.
Check that the server offers vm_ssh. Set request.action to choose an
operation. For Project operations, put the console's Project name in
top-level project. Read each result in structuredContent.data.
For an existing VM, start with the get-access action.
- Call
vm_sshwithrequest.actionset tolist-images. Pick an entry fromitemsusing itscatalogOS,storageClass, andminimumGiB. - Set
request.actiontocreateand supplyname,image,cpu,memoryGi,diskGi, and a new lowercase UUID v4operationIdinsiderequest. Use the approvedimagealias and at least the image minimum fordiskGi. - While
phaseispendingorenrolling, wait briefly and repeat the identical request with the sameoperationId. Continue whenphaseismanaged. Keep the returnedvmUIDwhen available. If the request isblocked, review its status before submitting another one. - Set
request.actiontoget-accessand includenameand thevmUIDwhen known. Use the returnedvmUID,username, allowedmethods, and a reachable address fromendpoints. Verify the host key againsthostKeyFingerprintand checknamedTransportReadybefore connecting.
This is a vm_ssh creation request. Replace the image alias and generate a
new operationId for your VM.
{
"project": "dev",
"request": {
"action": "create",
"name": "analysis-runner",
"image": "APPROVED_IMAGE_ALIAS",
"cpu": 2,
"memoryGi": 4,
"diskGi": 25,
"operationId": "7ac43ebe-2ba1-40fa-9be2-c62c5157475d"
}
}
For a personal key, use list-keys to find your registered key, or
register-key with label and the OpenSSH publicKey inside request.
Omit project for both Organization-level actions. To attach or detach the key,
use attach-key or detach-key with the Project and put name, vmUID,
and the registered key's id as keyId inside request. You need a Public
key grant to attach a key. The get-access result lists your own key
attachments on the VM.
Keep private keys on your workstation. Connect with OpenSSH to a reachable
endpoint after verifying its host fingerprint. If the VM offers CLI
certificate access, use the CLI certificate procedure
with the same Organization identity. vm_ssh never returns relay tickets or
guest passwords. The separate create_vm tool creates a Project-key VM.
Grant and remove access
An Organization administrator can manage SSH grants across the Organization. If you create a persistent VM with managed SSH, you can manage its grants while you retain Project permission to edit the VM and an effective VM administrator SSH grant on it.
- As a VM access administrator, open Access > Grant access.
- Select an eligible person or group and choose VM user or VM administrator. Select the sign-in methods to permit and set an optional expiry in End access.
- Click Save grant. Ask the recipient to sign in and verify that Connect shows the intended method.
To remove access, choose the action that matches your scope.
| Action | Effect |
|---|---|
| Detach a key under Access | Stops the key from authorizing fresh logins to this VM. |
| Retire key under Account > SSH keys | Stops fresh logins with that key across the Organization. |
| Remove grant on the VM | Removes the selected grant. Independent direct or inherited grants can still allow SSH. |
| Block a person on the VM | Denies the person's new managed SSH sign-ins to this VM, including through a group grant. |
| End sessions on the VM, when available | Requests closure of the person's open VM SSH sessions. Their grants can still authorize later sign-ins. |
| Remove the last qualifying Project membership | Revokes managed SSH in that Project. Registered keys remain available for grants in other Projects. |
| Remove Organization membership | Revokes managed SSH across the Organization and retires the member's key registrations. A returning member needs current grants and registrations. |
Check Revocation progress when the VM shows it. The browser and guest session statuses can progress separately. A detached or retired key can have an existing session. Use the separate session action when you need to close it.