Class BasicSSHUserPrivateKey
java.lang.Object
com.cloudbees.plugins.credentials.BaseCredentials
com.cloudbees.plugins.credentials.impl.BaseStandardCredentials
com.cloudbees.jenkins.plugins.sshcredentials.impl.BaseSSHUser
com.cloudbees.jenkins.plugins.sshcredentials.impl.BasicSSHUserPrivateKey
- All Implemented Interfaces:
SSHUser
,SSHUserPrivateKey
,com.cloudbees.plugins.credentials.common.IdCredentials
,com.cloudbees.plugins.credentials.common.StandardCredentials
,com.cloudbees.plugins.credentials.common.StandardUsernameCredentials
,com.cloudbees.plugins.credentials.common.UsernameCredentials
,com.cloudbees.plugins.credentials.Credentials
,ExtensionPoint
,Describable<com.cloudbees.plugins.credentials.Credentials>
,Serializable
A simple username / password for use with SSH connections.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
static class
Let the user enter the key directly via copy & pastestatic class
Deprecated.static class
A source of private keysstatic class
Descriptor for aBasicSSHUserPrivateKey.PrivateKeySource
static class
Deprecated.This approach has security vulnerability and should be migrated toBasicSSHUserPrivateKey.DirectEntryPrivateKeySource
Nested classes/interfaces inherited from class com.cloudbees.plugins.credentials.impl.BaseStandardCredentials
com.cloudbees.plugins.credentials.impl.BaseStandardCredentials.BaseStandardCredentialsDescriptor
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
Nested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.IdCredentials
com.cloudbees.plugins.credentials.common.IdCredentials.Helpers
Nested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.StandardCredentials
com.cloudbees.plugins.credentials.common.StandardCredentials.NameProvider
Nested classes/interfaces inherited from interface com.cloudbees.plugins.credentials.common.StandardUsernameCredentials
com.cloudbees.plugins.credentials.common.StandardUsernameCredentials.NameProvider
-
Field Summary
Fields inherited from class com.cloudbees.jenkins.plugins.sshcredentials.impl.BaseSSHUser
username
-
Constructor Summary
ConstructorDescriptionBasicSSHUserPrivateKey
(com.cloudbees.plugins.credentials.CredentialsScope scope, String id, String username, BasicSSHUserPrivateKey.PrivateKeySource privateKeySource, String passphrase, String description) Constructor for stapler. -
Method Summary
Modifier and TypeMethodDescriptionGets the passphrase for the private keys ornull
if the private keys are not protected by a passphase.Returns a collection of keys to try in order for authentication.protected Object
Methods inherited from class com.cloudbees.jenkins.plugins.sshcredentials.impl.BaseSSHUser
getUsername, isUsernameSecret, setUsernameSecret
Methods inherited from class com.cloudbees.plugins.credentials.impl.BaseStandardCredentials
equals, getDescription, getId, hashCode
Methods inherited from class com.cloudbees.plugins.credentials.BaseCredentials
getDescriptor, getScope
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.cloudbees.plugins.credentials.Credentials
forRun, getDescriptor, getScope
Methods inherited from interface com.cloudbees.plugins.credentials.common.IdCredentials
getId
Methods inherited from interface com.cloudbees.jenkins.plugins.sshcredentials.SSHUserPrivateKey
getPrivateKey
Methods inherited from interface com.cloudbees.plugins.credentials.common.StandardCredentials
getDescription
Methods inherited from interface com.cloudbees.plugins.credentials.common.UsernameCredentials
getUsername, isUsernameSecret
-
Constructor Details
-
BasicSSHUserPrivateKey
@DataBoundConstructor public BasicSSHUserPrivateKey(com.cloudbees.plugins.credentials.CredentialsScope scope, String id, String username, BasicSSHUserPrivateKey.PrivateKeySource privateKeySource, String passphrase, String description) Constructor for stapler.- Parameters:
scope
- the credentials scopeusername
- the username.privateKeySource
- the private key.passphrase
- the password.description
- the description.
-
-
Method Details
-
readResolve
- Overrides:
readResolve
in classBaseSSHUser
-
getPrivateKeys
Description copied from interface:SSHUserPrivateKey
Returns a collection of keys to try in order for authentication.- Specified by:
getPrivateKeys
in interfaceSSHUserPrivateKey
- Returns:
- a collection of keys to try in order for authentication.
- See Also:
-
getPrivateKeySource
-
getPassphrase
Gets the passphrase for the private keys ornull
if the private keys are not protected by a passphase.- Specified by:
getPassphrase
in interfaceSSHUserPrivateKey
- Returns:
- the passphrase for the private keys or
null
if the private key are not protected by a passphase.
-
BasicSSHUserPrivateKey.DirectEntryPrivateKeySource