p0cli: ssh-proxy: Troubleshooting
Last updated: May 2, 2025
Troubleshooting
1. Authentication & Configuration
Error Message | Cause | Resolution |
Please run ‘p0 login…’ | Not authenticated or token expired. | Run p0 login <org-slug>. |
Permission denied from P0 API | Missing “iam-write” on SSH integration. | Request SSH integration permissions from your admin. |
Cannot find P0 key folder | P0_PATH or home directory misconfigured. | Ensure ~/.p0/ssh exists and is writable by your user. |
2. Argument & Validation Errors
Symptom / Message | Cause | Resolution |
Destination contains / | Session alias must not include slashes. | Use alias only, e.g. prod-web-01, not prod/web-01. |
Missing one of the four required flags | Omitted --port, --provider, -i/--identityFile, or --requestJson. | Include all, e.g.: p0 ssh-proxy dest --provider aws --port 22 -i ~/.p0/ssh/id_rsa --requestJson ~/.p0/ssh/requests/dest.json |
3. Request JSON & Key File Issues
Error Message | Cause | Resolution |
ENOENT: no such file or directory, open ‘’ | Incorrect path for JSON or key file. | Verify both exist: ls -l ~/.p0/ssh/requests/dest.json ~/.p0/ssh/id_rsa |
Malformed JSON or parse error | Corrupted or invalid JSON in request file. | Delete and regenerate via p0 ssh session <destination> --provider <provider>. |
4. Provider Support & Port Constraints
Symptom / Message | Cause | Resolution |
Azure SSH port error | Specified non-22 port with --provider azure. | Use default port: --port 22. |
No ProxyCommand returned | SSH integration not installed/enabled for your provider. | Run p0 ls ssh session destination --size 5 and ask admin to enable. |
5. ProxyCommand Execution Failures
Symptom / Message | Cause | Resolution |
Immediate exit with no SSH traffic | Underlying proxy command failed silently. | Debug with shell tracing: bash -x $(which p0) ssh-proxy …. |
Errors from AWS SSM / GCP IAP CLIs | Cloud CLI not logged in or misconfigured. | Verify standalone commands:aws ssm start-session --target <id>gcloud compute start-iap-tunnel <instance> <port>Authenticate if needed. |
6. Network & Connectivity
Error Message | Cause | Resolution |
Network error: Unable to reach the server… | P0 API or cloud proxy endpoint unreachable. | Check internet, DNS, firewall/proxy settings. |
SSH hangs or times out | SSH port blocked by security groups, ACLs, or firewall. | Open port 22 (or your port) on VM security groups and verify VPC/subnet ACLs. |
If your issue persists, collect:
The exact p0 ssh-proxy command and its stderr output
Paths and existence checks for your JSON and key files
Results of p0 ls ssh session destination --size 5
Then reach out to your P0 support team with these details.