The value of the private key echoed in the Jenkins log. Or at least *** if the plugin hides it.
What I got:
[Pipeline] End of Pipeline
org.jenkinsci.plugins.credentialsbinding.impl.CredentialNotFoundException: No suitable binding handler could be found for type com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey. Supported types are StandardUsernamePasswordCredentials,FileCredentials,StringCredentials.
There is not support for credentials binding of SSH Credentials in the environment block of declarative pipeline. The SSHCredentials would need to implement a CredentialsBindingHandler.
Thanks, Allan BURDAJEWICZ! This is merged, and will be in the next release (1.3.7) (though there may be a 1.3.7-beta-2 first to make sure another fix doesn't cause problems)