🖥️SSH
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
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:
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.
Review the configuration and click Next.
(Optional) For AWS, enter a Grouping tag to group similar instances.
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.
Open a new browser tab and log into your AWS Management Console.
Once logged in, on the navigation bar, click CloudShell.
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:
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:
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
To display the GCP instances (previously set up for SSH access in Request AWS or GCP SSH Permissions), run the following command in your terminal:
Copy 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:
Your terminal displays a message with the wait 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.
(Optional) Update Your SSH Configuration for p0 ssh
p0 ssh
To integrate p0 ssh
with your native SSH setup, you must update your SSH configuration file. Follow these steps:
Open your SSH configuration file using a text editor of your choice. The SSH Configuration file is typically located at
~/.ssh/config
.Append the following lines to your SSH configuration file
To verify that
p0 ssh
is working correctly with your new set up, runssh your-hostname
. If everything is configured properly, ssh will connect to the host machine.
Last updated