Class SshCredential

java.lang.Object
org.springframework.credhub.support.KeyPairCredential
org.springframework.credhub.support.ssh.SshCredential

public class SshCredential extends KeyPairCredential
An SSH credential consists of a public and/or private key. At least one of these key values must be provided.
Author:
Scott Frederick
  • Constructor Details

    • SshCredential

      public SshCredential(String publicKey, String privateKey)
      Create an SshCredential from the provided public and private key. At least one of the key values must not be null.
      Parameters:
      publicKey - the public key; may be null only if privateKey is not null
      privateKey - the private key; may be null only if publicKey is not null
  • Method Details

    • getPublicKeyFingerprint

      public String getPublicKeyFingerprint()
      Get the fingerprint of the public key associated with the credential. This value can not be provided when creating an SshCredential, but may be provided by CredHub when retrieving one.
      Returns:
      the public key fingerprint value