Your browser does not allow storing cookies. We recommend enabling them.

SSH

User Authentication with Certificates

Certificate authentication is technically a part of the public-key authentication method. The signature created with the private key and the verification of the signature using the public key (contained in the X.509 certificate when doing certificate authentication) are done identically with both conventional public keys and certificates. The major difference is in determining whether a specific user is allowed to log in with a specific public key or certificate. With conventional public keys, every server must have every user's public key, whereas with certificates the users' public keys do not have to be distributed to the servers - distributing the public key of the certificate authority (CA) (self-signed certificate) is enough.

In brief, certificate authentication works as follows:

  1. The client sends the user certificate (which includes the user's public key) to the server. The packet also contains random data unique to the session and signed by the user's private key.

  2. The server uses the CA certificate (and external resources as required) to check that the user's certificate is valid.

  3. The server verifies that the user has a valid private key by checking the signature in the initial packet.

  4. The server matches the user certificate with the rules in the server configuration file to decide whether login is allowed or not.

Compared to conventional public-key authentication, this method is more secure because the system checks that the user certificate was issued by a trusted CA. In addition, certificate authentication is more convenient because no local database of user public keys is required on the server.

It is also easy to deny a user's access to the system by revoking his or her certificate, although this does not take effect until the next CRL update and requires that every other authentication method has been disabled. The status of a certificate can be checked either by using the Online Certificate Status Protocol (OCSP) or a certificate revocation list (CRL), which can be published either in an LDAP or HTTP repository.

OCSP is used if the certificate contains a valid Authority Info Access extension or if an ocsp-responder has been defined in the ssh-server-config.xml file. If no OCSP responder is defined or the OCSP connection fails, CRLs are used. The certificate should contain a valid CRL Distribution Point extension or an LDAP server for CRL fetching should be defined in the ssh-server-config.xml file.


 

 
PrivX
 

 

 
What to read next:

  • Reduce Secure Shell risk. Get to know the NIST 7966.



    The NISTIR 7966 guideline from the Computer Security Division of NIST is a direct call to action for organizations regardless of industry and is a mandate for the US Federal government.
    Download now
  • ISACA Practitioner Guide for SSH



    With contributions from practitioners, specialists and SSH.COM experts, the ISACA “SSH: Practitioner Considerations” guide is vital best practice from the compliance and audit community.
    Download now