public abstract class BaseSshTask<T extends BaseSshTask<T,E>,E extends BaseSshTaskProperties> extends Task<T,E>
Modifier and Type | Field and Description |
---|---|
protected BaseSshTaskProperties.AuthenticationType |
authenticationType |
protected @Nullable String |
hostFingerprint |
protected List<String> |
hosts |
protected @Nullable String |
key |
protected @Nullable String |
passphrase |
protected @Nullable String |
password |
protected int |
port |
protected @Nullable SharedCredentialsIdentifierProperties |
sharedCredentials |
protected String |
username |
conditions, description, requirements, taskEnabled
Constructor and Description |
---|
BaseSshTask() |
Modifier and Type | Method and Description |
---|---|
T |
authenticateWithKey(@NotNull Path keyPath)
Authenticate with key (without passphrase).
|
T |
authenticateWithKey(@NotNull String key)
Authenticate with key (without passphrase).
|
T |
authenticateWithKeyWithPassphrase(@NotNull Path keyPath,
@NotNull String passphrase)
Authenticate with key with passphrase.
|
T |
authenticateWithKeyWithPassphrase(@NotNull String key,
@NotNull String passphrase)
Authenticate with key with passphrase.
|
T |
authenticateWithPassword(@NotNull String password)
Authenticate with password associated with username
username(String) . |
T |
authenticateWithSshSharedCredentials(@NotNull SharedCredentialsIdentifier sharedCredentials) |
T |
authenticateWithUsernamePasswordSharedCredentials(@NotNull SharedCredentialsIdentifier sharedCredentials) |
boolean |
equals(Object o) |
int |
hashCode() |
T |
host(String... host)
Hostnames or IP addresses of the remote hosts.
|
T |
host(@NotNull String host)
Hostname or IP address of the remote host.
|
T |
hostFingerprint(@NotNull String hostFingerprint)
Set public key fingerprint.
|
T |
port(int port)
Set the port number of the remote host that is used for the SSH connection.
|
T |
portDefault()
Set the port number of the remote host to the default value (22).
|
T |
username(@NotNull String username)
Username you want to use to access the remote host.
|
build, conditions, description, enabled, requirements, toString
protected String username
protected BaseSshTaskProperties.AuthenticationType authenticationType
@Nullable protected @Nullable String password
@Nullable protected @Nullable String key
@Nullable protected @Nullable String passphrase
@Nullable protected @Nullable String hostFingerprint
protected int port
@Nullable protected @Nullable SharedCredentialsIdentifierProperties sharedCredentials
public T username(@NotNull @NotNull String username)
public T authenticateWithPassword(@NotNull @NotNull String password)
username(String)
.public T authenticateWithKeyWithPassphrase(@NotNull @NotNull String key, @NotNull @NotNull String passphrase)
key
- - SSH private keypassphrase
- - SSH passphrasepublic T authenticateWithKeyWithPassphrase(@NotNull @NotNull Path keyPath, @NotNull @NotNull String passphrase)
keyPath
- - path to SSH private keypassphrase
- - SSH passphrasepublic T authenticateWithKey(@NotNull @NotNull String key)
key
- - SSH private keypublic T authenticateWithKey(@NotNull @NotNull Path keyPath)
keyPath
- - path to SSH private keypublic T authenticateWithSshSharedCredentials(@NotNull @NotNull SharedCredentialsIdentifier sharedCredentials)
public T authenticateWithUsernamePasswordSharedCredentials(@NotNull @NotNull SharedCredentialsIdentifier sharedCredentials)
public T hostFingerprint(@NotNull @NotNull String hostFingerprint)
public T port(int port)
portDefault()
public T portDefault()
portDefault()
public boolean equals(Object o)
equals
in class Task<T extends BaseSshTask<T,E>,E extends BaseSshTaskProperties>
public int hashCode()
hashCode
in class Task<T extends BaseSshTask<T,E>,E extends BaseSshTaskProperties>
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.