Configuring certificate-based SSH
Administrators can configure managed servers to accept SSH connections that are authenticated by short-lived certificates issued by PingOne Privilege. This process must be completed on each target server.
|
Automation tools such as Ansible or custom scripting can apply these changes consistently across all your servers. |
Enabling certificate-based SSH
First, enable certificate-based SSH using the admin portal or API:
-
Retrieve the key from the admin portal:
-
Go to Accounts.
-
Select the appropriate account and click View Public Key.
-
Copy the public key content.
-
-
Retrieve the key for automation:
-
Use a
curlcommand to fetch the key from the API endpoint:curl https://console.tun.procyon.ai/api/<tenant>/v1/sshcaIf VPN interop mode is enabled, use the following
curlcommand instead:curl https://local.procyon.ai:8643
-
Configure the target server
Next, apply the configuration to each target server.
-
Connect to the server using a standard SSH client.
-
Create a file (for example,
/etc/ssh/ca.pub) and paste the CA public key into it. -
Open the SSH daemon’s configuration file for editing.
sudo vi /etc/ssh/sshd_config -
Add the
TrustedUserCAKeysdirective to the file, pointing to the CA public key you just created.# Add this line to sshd_config TrustedUserCAKeys /etc/ssh/ca.pub
Ensure 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.
sudo systemctl restart sshd