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 String |
host |
protected String |
hostFingerprint |
protected String |
key |
protected String |
passphrase |
protected String |
password |
protected int |
port |
protected SharedCredentialsIdentifierProperties |
sharedCredentials |
protected String |
username |
conditions, description, requirements, taskEnabled
Constructor and Description |
---|
BaseSshTask() |
Modifier and Type | Method and Description |
---|---|
T |
authenticateWithKey(Path keyPath)
Authenticate with key (without passphrase).
|
T |
authenticateWithKey(String key)
Authenticate with key (without passphrase).
|
T |
authenticateWithKeyWithPassphrase(Path keyPath,
String passphrase)
Authenticate with key with passphrase.
|
T |
authenticateWithKeyWithPassphrase(String key,
String passphrase)
Authenticate with key with passphrase.
|
T |
authenticateWithPassword(String password)
Authenticate with password associated with username
username(String) . |
T |
authenticateWithSshSharedCredentials(SharedCredentialsIdentifier sharedCredentials) |
T |
authenticateWithUsernamePasswordSharedCredentials(SharedCredentialsIdentifier sharedCredentials) |
boolean |
equals(Object o) |
int |
hashCode() |
T |
host(String host)
Hostname or IP address of the remote host.
|
T |
hostFingerprint(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(String username)
Username you want to use to access the remote host.
|
build, conditions, description, enabled, requirements, toString
protected String host
protected String username
protected BaseSshTaskProperties.AuthenticationType authenticationType
@Nullable protected String password
@Nullable protected String key
@Nullable protected String passphrase
@Nullable protected String hostFingerprint
protected int port
@Nullable protected SharedCredentialsIdentifierProperties sharedCredentials
public T username(@NotNull String username)
public T authenticateWithPassword(@NotNull String password)
username(String)
.public T authenticateWithKeyWithPassphrase(@NotNull String key, @NotNull String passphrase)
key
- - SSH private keypassphrase
- - SSH passphrasepublic T authenticateWithKeyWithPassphrase(@NotNull Path keyPath, @NotNull String passphrase)
keyPath
- - path to SSH private keypassphrase
- - SSH passphrasepublic T authenticateWithKey(@NotNull String key)
key
- - SSH private keypublic T authenticateWithKey(@NotNull Path keyPath)
keyPath
- - path to SSH private keypublic T authenticateWithSshSharedCredentials(@NotNull SharedCredentialsIdentifier sharedCredentials)
public T authenticateWithUsernamePasswordSharedCredentials(@NotNull SharedCredentialsIdentifier sharedCredentials)
public T hostFingerprint(@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 © 2020 Atlassian Software Systems Pty Ltd. All rights reserved.