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

Tectia

Certificates Stored in SAF

The following example assumes that the SSHD2 user created in Creating the SSHD2 User is used to run the server.

To use SAF certificates for authenticating the server, do the following steps. Replace the names and IDs with those appropriate to your system:

  1. Create the server host key in SAF by giving the following TSO commands:

    RACDCERT ID(SSHD2) GENCERT SUBJECTSDN(CN('LPAR1') OU('RD')
      O('EXAMPLE')) SIZE(1024) WITHLABEL('LPAR1.EXAMPLE.COM')
    RACDCERT ID(SSHD2) LIST
    
  2. Give the following TSO command to generate the certification request:

    RACDCERT ID(SSHD2) GENREQ(LABEL('LPAR1.EXAMPLE.COM')) 
      DSN('SSHD2.LPAR1.CRT.REQ')
    
  3. Use the PKCS#10 certification request in the dataset 'SSHD2.LPAR1.CRT.REQ' to enroll the certificate. The actual steps depend on your CA setup.

  4. After the enrollment is completed, store the received certificate to a dataset, for example 'SSHD2.LPAR1.CRT'.

  5. To connect the new certificate to a key ring, give the following TSO commands:

    RACDCERT ID(SSHD2) ADD('SSHD2.LPAR1.CRT') TRUST 
      WITHLABEL('LPAR1.EXAMPLE.COM')
    RACDCERT ID(SSHD2) ADDRING(SSH-HOSTKEY)
    RACDCERT ID(SSHD2) CONNECT(ID(SSHD2) LABEL('LPAR1.EXAMPLE.COM') 
      RING(SSH-HOSTKEY) USAGE(PERSONAL))
    RACDCERT ID(SSHD2) LISTRING(SSH-HOSTKEY)
    
  6. For the settings to take effect, give the following TSO command:

    SETROPTS RACLIST(DIGTCERT) REFRESH
    
  7. Define the z/OS SAF external key provider in the /opt/tectia/etc/sshd2_config file:

    HostKeyEkProvider       zos-saf
    HostKeyEkInitString      "KEYS(ID(SSHD2) RING(SSH-HOSTKEY) 
      LABEL('LPAR1.EXAMPLE.COM'))"
    HostKey.Cert.Required    yes
    

    Note that HostKeyEkInitString must point to a single private key. Setting the HostKey.Cert.Required option to yes defines that the server must authenticate with a certificate. When the z/OS SAF provider is used, setting the option to no means that only the public key found in the SAF certificate is used. Setting the option to optional means that both the SAF certificate and the public key found in the SAF certificate are used.

For more information on the configuration file options, see sshd2_config. For information on the format of the external key initialization string, see ssh-externalkeys.


 

 
Highlights from the SSH.COM blog:

  • Cryptomining with the SSH protocol: what big enterprises need to know about it

    Cryptomining malware is primarily thought of as targeting desktops and laptops and is used to hijack system resources to mine cryptocurrency.
    Read more
  • SLAM the door shut on traditional privileged access management

    Did you know that something as trivial-sounding as granting access for your developers or third parties to a product development environment can throw a gorilla-sized monkey wrench into your operations and productivity?
    Read more
  • We broke the IT security perimeter

    Everyone understands the concept of a security perimeter. You only gain access if you are identified and authorized to do so.
    Read more