Configuring certificate-based SSH
To enable passwordless access, you can configure your managed servers to trust SSH connections that are authenticated by short-lived certificates issued by PingOne Privilege. This process must be completed on each target server that you want to access via SSH.
|
Automation tools such as Ansible, Terraform, or custom scripting can help you apply these changes consistently across all your servers. |
Step 1: Retrieve the PingOne Privilege SSH CA Public Key
First, you need to get the SSH Certificate Authority (CA) public key for your tenant. You can do this through the admin console or via an API call.
Method A: Using the Admin Console
-
In the PingOne Privilege admin console, go to Accounts.
-
Select the appropriate account and click View Public Key.
-
Copy the public key content.
Method B: Using the API
You can use a curl command to fetch the key from the API endpoint. This method is ideal for automation.
-
For standard environments:
$ curl https://console.tun.procyon.ai/api/{tenant}/v1/sshca -
If VPN interop mode is enabled:
$ curl https://local.procyon.ai:8643/api/{tenant}/v1/sshca
|
Replace |
Step 2: Configure the Target Server
Next, apply the configuration to each target server.
-
Connect to the server using a standard SSH client.
-
Create a file to store the public key, for example
/etc/ssh/ca.pub), and paste the CA public key you retrieved in the previous step into it. -
Open the SSH daemon’s configuration file for editing. On most Linux distributions, this file is located at
/etc/ssh/sshd_config`.$ sudo vi /etc/ssh/sshd_config -
Add the
TrustedUserCAKeysdirective to the file, pointing to the CA public key file you just created.# Add this line to sshd_config TrustedUserCAKeys /etc/ssh/ca.pubEnsure the path in this directive exactly matches the location where you saved the
ca.pubfile. -
Save your changes to the
sshd_configfile. -
Restart the SSH daemon to apply the new configuration. The command can vary depending on your operating system.
For systems using
systemd:$ sudo systemctl restart sshdFor older systems, you might use:
$ sudo service sshd restart
Your server is now configured to trust SSH certificates from PingOne Privilege.