public final class SshHostAccessor extends Object implements com.palantir.giraffe.host.AuthenticatedHostAccessor<SshCredential>
Modifier and Type | Method and Description |
---|---|
static SshHostAccessor |
forCredential(com.palantir.giraffe.host.Host host,
int port,
SshCredential credential)
Returns a new
SshHostAccessor that authenticates using the given
SshCredential on the given port. |
static SshHostAccessor |
forCredential(com.palantir.giraffe.host.Host host,
SshCredential credential)
Returns a new
SshHostAccessor that authenticates using the given
SshCredential . |
static SshHostAccessor |
forKerberos(String hostname,
String username)
Returns a new
SshHostAccessor that authenticates as the given
user using the system Kerberos configuration. |
static SshHostAccessor |
forKey(String hostname,
String username,
Path keyFile)
Returns a new
SshHostAccessor that authenticates using the given
private key. |
static SshHostAccessor |
forKey(String hostname,
String username,
String privateKey)
Returns a new
SshHostAccessor that authenticates using the given
private key. |
static SshHostAccessor |
forPassword(String hostname,
String username,
char[] password)
Returns a new
SshHostAccessor that authenticates using the given password. |
static SshHostAccessor |
forPassword(String hostname,
String username,
String password)
Returns a new
SshHostAccessor that authenticates using the given password. |
com.palantir.giraffe.host.Host |
getHost() |
com.palantir.giraffe.host.HostControlSystem |
open() |
SshSystemRequest |
request() |
public static SshHostAccessor forPassword(String hostname, String username, String password)
SshHostAccessor
that authenticates using the given password.hostname
- the name of the host to accessusername
- the user to authenticate aspassword
- the user's passwordpublic static SshHostAccessor forPassword(String hostname, String username, char[] password)
SshHostAccessor
that authenticates using the given password.hostname
- the name of the host to accessusername
- the user to authenticate aspassword
- the user's passwordpublic static SshHostAccessor forKey(String hostname, String username, Path keyFile) throws IOException
SshHostAccessor
that authenticates using the given
private key.hostname
- the name of the host to accessusername
- the user to authenticate askeyFile
- the private key file; the matching public key must be
present on the serverIOException
public static SshHostAccessor forKey(String hostname, String username, String privateKey)
SshHostAccessor
that authenticates using the given
private key.hostname
- the name of the host to accessusername
- the user to authenticate asprivateKey
- the private key; the matching public key must be
present on the serverpublic static SshHostAccessor forKerberos(String hostname, String username)
SshHostAccessor
that authenticates as the given
user using the system Kerberos configuration.hostname
- the name of the host to accessusername
- the user to authenticate aspublic static SshHostAccessor forCredential(com.palantir.giraffe.host.Host host, SshCredential credential)
SshHostAccessor
that authenticates using the given
SshCredential
.host
- the host to accesscredential
- the credential to use for authenticationpublic static SshHostAccessor forCredential(com.palantir.giraffe.host.Host host, int port, SshCredential credential)
SshHostAccessor
that authenticates using the given
SshCredential
on the given port.host
- the host to accessport
- the port that SSH is listening oncredential
- the credential to use for authenticationpublic com.palantir.giraffe.host.Host getHost()
getHost
in interface com.palantir.giraffe.host.HostAccessor
public SshSystemRequest request()
request
in interface com.palantir.giraffe.host.AuthenticatedHostAccessor<SshCredential>
request
in interface com.palantir.giraffe.host.HostAccessor
public com.palantir.giraffe.host.HostControlSystem open() throws IOException
open
in interface com.palantir.giraffe.host.HostAccessor
IOException