Acquire the CA certificate and copy it to the server machine. You can either copy the X.509 certificate(s) as such or you can copy a PKCS #7 package including the CA certificate(s). Certificates can be extracted from a PKCS #7 package by specifying the
-7option with ssh-keygen-g3.
Certificate authentication is a part of the
publickeyauthentication method. Make sure that you have enabled it in the
AllowedAuthentications publickey AuthPublicKey.Cert.Required no
yesdefines that the user must authenticate with a certificate or else the authentication will fail.
Specify the trusted CA certificate and the mapping file(s) in the
Pki <ca-cert-path> MapFile <map-file-path>
You can define several CA certificates by using several
Pki test-ca1.crt MapFile cert-user-mapping1.txt Pki test-ca2.crt MapFile cert-user-mapping2a.txt MapFile cert-user-mapping2b.txt
Note that multiple
MapFilekeywords are permitted per
Pkikeyword. Also, if no mapping file is defined, all connections are denied even if user certificates can be verified using the defined CA certificate. The server will accept only certificates issued by defined CA(s).
LdapServers ldap://ldap.example.com:389 SocksServer socks://fw.example.com:1080
Defining the LDAP server is not necessary if the CA certificate contains a
CRL Distribution Pointor an
Authority Info Accessextension.
Create the certificate user mapping file as described in Certificate User Mapping File.
Restart ssh-certd as instructed in Restarting the Certificate Validator.
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.
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.