1 - Abstract
As there are two different types of certificates, there are two individual tasks to setup a host.
- Host Certificate
- Client Certificate
If one would like to use only one certificate, execute the corresponding subtask.
2 - Host Certificate
Step 1 - Sign host's public key
To enable certificate based login on a host, its public RSA key needs to be singed by the certificate authority. To do so copy the public RSA key
'ssh_host_rsa_key.pub' to the CA, signed it and copy the certificate back to the host. The resulting certificate is called
'. The instructions how to singed a hosts public key can be found here.
Step 2 - Tell the SSH daemon about the certificate
To tell the SSH daemon about the certificate add the following configuration lines to the file
'. The host sends this certificate to the client to identify itself as a trusted host
Step 3 - Restart the SSH daemon
3 - Client Certificate
To setup the client certificate, the public key of the certificate authority is needed. There are three public keys called
Step 1 - Verify client certificates
Add the following lines to the file
to tell the SSH daemon about the public key to verify client certificates. The host trusts all certificates the are signed by our CA.
Copy the public keys to the specified location.
Step 2 - Principals
Next we configure the hosts to accept only certain principals. To do so, add this line to
Then we need to populate the principals file. For each user we need to create a file.
This allows to all users to login as root that have either
root-everywhere specified in the list of principals within their certificate.
You can control access to any other local user by creating the corresponding files under