Request SSH Permissions
How to request SSH permissions for AWS and GCP instances.
This topic describes how to request SSH permissions for Amazon Web Services (AWS) and Google Cloud Platform (GCP) instances. P0 SSH provides full SSH functionality, enabling you to securely manage and configure remote servers.
This guide contains the following sections:
Prerequisites
Existing P0 account at p0.app
Standard terminal application that supports SSH (e.g., Terminal, Command Prompt, PowerShell, or Bash)
Node.js version 20 or later
(For AWS) Existing Okta and/or AWS Identity Center account and an associated P0 directory integration
These instructions use Okta to manage user access and permissions.
Install the P0 CLI Package
You must install the P0 CLI package on your computer before you request permissions using SSH:
Open your computerβs terminal.
Navigate to the directory where you'll install the P0 CLI using the following command:
Ensure you replace <path/to/my/directory>
with your specific directory path.
Install the P0 CLI package:
(Recommended) Run the following command to globally install the P0 CLI package:
Alternatively, use npx to run the P0 CLI without installing it:
Request AWS or GCP SSH Permissions
To request AWS or GCP SSH permissions:
Go to p0.app in your browser. Select Integrations, then under the Resources section, click SSH.
From the list of Available components, click SSH Management.
Click + Add account.
From the Account identifier dropdown, select your AWS account or GCP project, then click Next.
Ensure your AWS or GCP account is connected to P0 and the required integrations are installed. Without this setup no accounts will appear in the Account identifier dropdown.
Review the configuration and click Next.
(Optional) For AWS, enter a Grouping tag to group similar instances.
You can use the Grouping tag as the
<instance-name>
when you Configure an AWS Account.Once the P0 CLI is installed, you can use the command
p0 request ssh group --name <value>
to combine AWS instances that share the same tag value.
Click Finish to complete the SSH permissions request.
Configure Accounts
AWS and GCP accounts require different configuration processes. Choose the configuration instructions you need:
Configure an AWS Account
From the p0.app site, navigate to the SSH Management page, and copy the shell commands displayed.
Keep this browser tab open. You will come back to this page in later steps.
Open a new browser tab and log into your AWS Management Console.
Once logged in, on the navigation bar, click CloudShell.
Alternatively, you can use the search bar to type CloudShell and select it from the results.
AWS CloudShell will open in the consoleβs bottom panel.
Paste the commands from the SSH Management page into AWS CloudShell, and run them. This creates an AWS Systems Manager (SSM) document, which enables P0 to provision sudo access, create a user directory, and configure authorized keys for user authentication.
Return to the browser tab for the p0.app SSH Management page, click Next, and wait for P0 to configure the account.
Click Finish to complete the configuration.
The account now appears on the SSH Management page.
In your terminal, run the following command to log into your P0 organization using Okta:
Replace <your-p0-organization-name>
with your P0 organization name. You can find your organization name in the p0.app
URL (e.g. https://p0.app/o/your-p0-organization-name
).
In the Okta window that displays, enter your activation code and click Next.
Return to your terminal and use the following command to request SSH access to your AWS instance or P0 grouping tag:
Replace
<instance-name>
with the name of the AWS instance or a P0 grouping tag from Request AWS or GCP SSH Permissions. If you have multiple AWS instances with the same name, you may need to use the--parent <account_id>
flag within the command.Direct
ssh
access is not supported. While directssh
may work, usep0 ssh
to ensure security controls and compliance.
Wait for P0 to complete access provisioning. Your terminal displays the status of your request, and indicates whether it was approved or denied.
After SSH access is approved, you can run P0 AWS commands. For example, you can make an access request, or use the following command to list available SSH session destinations:
Congratulations! You're now set up with SSH for P0 on AWS.
Configure a GCP Project
Run the following command in your terminal, to display the GCP instances (previously set up for SSH access in Request AWS or GCP SSH Permissions):
Locate the name of the GCP instance you want to access from the resulting list. In the following example, private-node is the GCP instance name.
In your terminal, run the following command to request SSH access to your GCP instance:
Replace <instance-name>
with the name of the GCP instance, identified in the previous step. If you have multiple GCP instances with the same name, you may need to use the --parent <account_id>
flag within the command.
Your terminal displays a wait message and time for access approval. A subsequent message confirms whether the access request is approved or denied.
After SSH access is approved, you can run P0 GCP commands. For example, you can make an access request or use the following command to list available SSH session destinations:
Congratulations! You're now set up with SSH for P0 on Google Cloud.
Last updated