Class BaseSshTask<T extends BaseSshTask<T,E>,E extends BaseSshTaskProperties>
- java.lang.Object
-
- com.atlassian.bamboo.specs.api.builders.EntityPropertiesBuilder<P>
-
- com.atlassian.bamboo.specs.api.builders.task.Task<T,E>
-
- com.atlassian.bamboo.specs.builders.task.BaseSshTask<T,E>
-
public abstract class BaseSshTask<T extends BaseSshTask<T,E>,E extends BaseSshTaskProperties> extends Task<T,E>
-
-
Field Summary
Fields Modifier and Type Field Description protected BaseSshTaskProperties.AuthenticationTypeauthenticationTypeprotected @Nullable StringhostFingerprintprotected List<String>hostsprotected @Nullable Stringkeyprotected @Nullable Stringpassphraseprotected @Nullable Stringpasswordprotected intportprotected @Nullable SharedCredentialsIdentifierPropertiessharedCredentialsprotected Stringusername-
Fields inherited from class com.atlassian.bamboo.specs.api.builders.task.Task
conditions, description, requirements, taskEnabled
-
-
Constructor Summary
Constructors Constructor Description BaseSshTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TauthenticateWithKey(@NotNull String key)Authenticate with key (without passphrase).TauthenticateWithKey(@NotNull Path keyPath)Authenticate with key (without passphrase).TauthenticateWithKeyWithPassphrase(@NotNull String key, @NotNull String passphrase)Authenticate with key with passphrase.TauthenticateWithKeyWithPassphrase(@NotNull Path keyPath, @NotNull String passphrase)Authenticate with key with passphrase.TauthenticateWithPassword(@NotNull String password)Authenticate with password associated with usernameusername(String).TauthenticateWithSshSharedCredentials(@NotNull SharedCredentialsIdentifier sharedCredentials)TauthenticateWithUsernamePasswordSharedCredentials(@NotNull SharedCredentialsIdentifier sharedCredentials)booleanequals(Object o)inthashCode()Thost(@NotNull String host)Hostname or IP address of the remote host.Thost(@NotNull String... host)Hostnames or IP addresses of the remote hosts.ThostFingerprint(@NotNull String hostFingerprint)Set public key fingerprint.Tport(int port)Set the port number of the remote host that is used for the SSH connection.TportDefault()Set the port number of the remote host to the default value (22).Tusername(@NotNull String username)Username you want to use to access the remote host.-
Methods inherited from class com.atlassian.bamboo.specs.api.builders.task.Task
build, conditions, description, enabled, requirements, toString
-
-
-
-
Field Detail
-
username
protected String username
-
authenticationType
protected BaseSshTaskProperties.AuthenticationType authenticationType
-
password
@Nullable protected @Nullable String password
-
key
@Nullable protected @Nullable String key
-
passphrase
@Nullable protected @Nullable String passphrase
-
hostFingerprint
@Nullable protected @Nullable String hostFingerprint
-
port
protected int port
-
sharedCredentials
@Nullable protected @Nullable SharedCredentialsIdentifierProperties sharedCredentials
-
-
Method Detail
-
host
public T host(@NotNull @NotNull String... host)
Hostnames or IP addresses of the remote hosts.
-
username
public T username(@NotNull @NotNull String username)
Username you want to use to access the remote host.
-
authenticateWithPassword
public T authenticateWithPassword(@NotNull @NotNull String password)
Authenticate with password associated with usernameusername(String).
-
authenticateWithKeyWithPassphrase
public T authenticateWithKeyWithPassphrase(@NotNull @NotNull String key, @NotNull @NotNull String passphrase)
Authenticate with key with passphrase.- Parameters:
key- - SSH private keypassphrase- - SSH passphrase
-
authenticateWithKeyWithPassphrase
public T authenticateWithKeyWithPassphrase(@NotNull @NotNull Path keyPath, @NotNull @NotNull String passphrase)
Authenticate with key with passphrase.- Parameters:
keyPath- - path to SSH private keypassphrase- - SSH passphrase
-
authenticateWithKey
public T authenticateWithKey(@NotNull @NotNull String key)
Authenticate with key (without passphrase).- Parameters:
key- - SSH private key
-
authenticateWithKey
public T authenticateWithKey(@NotNull @NotNull Path keyPath)
Authenticate with key (without passphrase).- Parameters:
keyPath- - path to SSH private key
-
authenticateWithSshSharedCredentials
public T authenticateWithSshSharedCredentials(@NotNull @NotNull SharedCredentialsIdentifier sharedCredentials)
-
authenticateWithUsernamePasswordSharedCredentials
public T authenticateWithUsernamePasswordSharedCredentials(@NotNull @NotNull SharedCredentialsIdentifier sharedCredentials)
-
hostFingerprint
public T hostFingerprint(@NotNull @NotNull String hostFingerprint)
Set public key fingerprint.
-
port
public T port(int port)
Set the port number of the remote host that is used for the SSH connection. The default value is 22.- See Also:
portDefault()
-
portDefault
public T portDefault()
Set the port number of the remote host to the default value (22).- See Also:
portDefault()
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classTask<T extends BaseSshTask<T,E>,E extends BaseSshTaskProperties>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classTask<T extends BaseSshTask<T,E>,E extends BaseSshTaskProperties>
-
-