# Tailscale

This guide describes how to connect P0 to your Tailscale network to enable just-in-time SSH access governed by your Tailscale policy file.

### Before you begin

* You must have an active Tailscale account.
* You must have an Tailscale API key. API keys can be generated from the [Keys](https://login.tailscale.com/admin/settings/keys) page of the admin console provided you have either an **Owner**, **Admin**, or **Network admin** role.
* P0 manages access by dynamically inserting temporary grants into your Tailscale policy file. Ensure you are comfortable with an automated service managing these grants.
* Installed the [P0 CLI package](https://github.com/p0-security/p0cli) if you are making requests through PO CLI.

### Setting up Tailscale

The installation process involves generating an API key in Tailscale and providing it to P0.

1. Navigate to the **Integrations** page on [p0.app](https://p0.app), under **Resources** click **Tailscale**.

   <figure><img src="https://3783273641-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQNwGQz62W737pY0FzVb%2Fuploads%2Fgit-blob-e1c6bb6bc05e7246a2d1a0fbb17467673fcc306f%2Ftailscale_install.png?alt=media" alt="P0 Integrations page with Tailscale selected." width="375"><figcaption></figcaption></figure>
2. Click the **Tailscale policy management**.

   <figure><img src="https://3783273641-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSQNwGQz62W737pY0FzVb%2Fuploads%2Fgit-blob-34dd29112908bd84e294780eeb962d239db6251f%2Ftailscale_management_policy.png?alt=media" alt="Tailscale policy management page in P0." width="563"><figcaption></figcaption></figure>
3. Click **Add organization**. Give an **Organization identifier** and click **Next**.
4. Enter your **API key**.
5. Click **Finish**.

{% hint style="success" %}
Congratulations! You have successfully set up Tailscale for P0. You can return to the Tailscale policy management page at any time to update the API Key by toggling on **Hash**.
{% endhint %}
