For the complete documentation index, see llms.txt. This page is also available as Markdown.

Custom jump host

Connect P0 to your Azure VMs through your own virtual machine acting as a jump host.

When you select the Custom jump host connection type, P0 connects through a virtual machine that acts as a jump host, instead of a managed Azure Bastion host. You provide the jump host VM's Azure resource ID. P0 validates the resource ID and resolves the public IP address on the VM's primary NIC at install time, then uses that IP to reach the jump host for SSH sessions.

This page is one of two connection types for Configure bastion host integration. For an overview and the shared subscription steps, start on the Configure bastion host integration page.

Prerequisites

You must have a virtual machine that P0 can use as a jump host. The VM must meet the following requirements.

Requirement
Details

Public IP address

The VM must have a public IP address on its primary network interface (NIC). P0 resolves this IP at install time and uses it to reach the jump host.

Azure AD login for Linux extension

The VM must have the Azure AD login for Linux extension (AADSSHLoginForLinux) installed. P0 authenticates SSH sessions through Azure IAM, so the jump host must support this plugin.

SSH server

The VM must have an SSH server (sshd) installed and running so it can serve as a jump host for SSH sessions. For recommended sshd settings and sizing limits, see Jump host sizing and tuning.

Resource ID

You must have the VM's Azure resource ID, in the format /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupId}/providers/Microsoft.Compute/virtualMachines/{vmName}.

A custom jump host doesn't use a P0-created role. Instead, your connecting users hold Azure roles that you specify: a standard user role that grants the Permissions needed to reach VMs through the jump host over Azure IAM, and an admin user role that grants sudo access on the target VM. Both roles are required.

Permissions

P0 doesn't create a role for the custom jump host connection type. Instead, you grant roles to the users who connect to VMs through the jump host, so they can reach those VMs over Azure IAM.

For each field, you can point P0 at a built-in role, an existing custom role, or a new custom role that you create. If you create your own role, see Create a custom role for the Azure CLI and Terraform steps.

Standard user role

Point the Standard user role id field at a built-in role, an existing custom role, or a new custom role that you create. P0 recommends the built-in Virtual Machine User Login role (fb879df8-f326-4884-b1cf-06f3ad86be52).

At minimum, the role must include these permissions:

The Microsoft.Compute/virtualMachines/login/action data action lets the user sign in to the VM through the Azure AD login for Linux extension. The read actions let the connecting user resolve the jump host and target VM network configuration.

Admin user role

Configure an Admin user role id for sudo access on the target VM. Configure this field even if you don't allow sudo now. P0 grants the role at the target VM only when a request opts into sudo access, but you must configure it at install time. Point it at a built-in role, an existing custom role, or a new custom role. P0 recommends the built-in Virtual Machine Administrator Login role (1c0163c0-47e6-4577-8991-ea5c82e286e4).

A custom admin role must include the same permissions as the standard user role, plus the Microsoft.Compute/virtualMachines/loginAsAdmin/action data action:

The Microsoft.Compute/virtualMachines/loginAsAdmin/action data action lets the user sign in to the VM as an administrator with sudo privileges.

Create a custom role

If you don't use a built-in role, create a custom role from the permissions described earlier in this topic using the Azure CLI or Terraform. See Create a custom role for step-by-step instructions with both tools.

Setup steps

Complete Get started first, then select Custom jump host as the connection type and continue with the following steps.

  1. Enter the Virtual machine resource ID of the jump host VM. P0 validates the resource ID format and confirms the VM has a public IP address on its primary NIC.

    The virtual machine resource ID follows this format:

    /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupId}/providers/Microsoft.Compute/virtualMachines/{vmName}

  2. Enter the Standard user role id of the role your connecting users hold to reach VMs through the jump host over Azure IAM. This can be a built-in role, an existing custom role, or a new custom role. See Standard user role for the minimum permissions it must include.

    P0 does not create this role, so no role setup commands run for this connection type.

  3. Enter the Admin user role id of the role that grants sudo access on the target VM. You must provide this field, even if you don't allow sudo now. P0 assigns the role at the target VM only when a request opts into sudo access, but you must configure it at install time. See Admin user role for the recommended role.

The Bastion host configuration is now complete.

Manage with the P0 Terraform provider

Instead of entering the jump host details in the dashboard, you can register the custom jump host connection with P0 as code using the p0_azure_bastion_host resource in the P0 Terraform provider. To connect through a custom jump host, configure the resource's jump_host block. This is the recommended path for teams that manage their P0 configuration declaratively.

The jump_host mode of the p0_azure_bastion_host resource requires P0 Terraform provider v0.47.0 or later.

In jump_host mode, the resource registers your existing jump host VM with P0. No staged resource or Azure Bastion host is needed. The VM must have a public IP address on its primary network interface, which P0 resolves and stores at install time. You still create the roles your connecting users hold (Permissions) in Azure and pass their role definition IDs to the resource: the jump_host block requires both standard_access_role_id (standard, non-sudo access) and admin_access_role_id (sudo access).

Each role ID can point to a built-in role, or a custom role (Create a custom role) scoped to a subscription or a management group. The following example uses Azure's built-in Virtual Machine User Login and Virtual Machine Administrator Login roles. These roles are defined at the tenant root, so their role definition IDs are stable across every subscription and management group and don't include a subscription or management group prefix.

  1. Install the Terraform CLI if you haven't already. See the Terraform installation guide.

  2. Get a P0 API token. The P0 provider authenticates with a bearer token. See Authenticating with the P0 API for how to get one. Export it so the provider can read it:

  1. Register the custom jump host. Declare the P0 provider, the base Azure resources, and the p0_azure_bastion_host resource with a jump_host block:

  1. Apply the configuration:

To let P0 terminate active jump host sessions when access is revoked, also install the Jump host management component, which the provider exposes as the p0_azure_jump_host resource.

For the full argument reference, see the p0_azure_bastion_host resource documentation.

Troubleshooting

Error
Cause
Resolution

"Enter a valid virtual machine resource ID"

The custom jump host resource ID is malformed

Enter the full VM resource ID, in the format /subscriptions/.../providers/Microsoft.Compute/virtualMachines/...

"The jump host virtual machine must have a public IP address on its primary NIC"

The jump host VM has no public IP on its primary NIC

Assign a public IP to the VM's primary network interface, then retry

Next step

Proceed to Install SSH access to connect P0 to your Azure VMs.

Last updated