public class SshSupport extends Object
Constructor and Description |
---|
SshSupport() |
Modifier and Type | Method and Description |
---|---|
static String |
runSshCommand(URIish sshUri,
CredentialsProvider provider,
FS fs,
String command,
int timeout)
Utility to execute a remote SSH command and read the first line of
output.
|
public static String runSshCommand(URIish sshUri, @Nullable CredentialsProvider provider, FS fs, String command, int timeout) throws IOException, CommandFailedException
sshUri
- the SSH remote URIprovider
- the CredentialsProvider
or null
.fs
- the FS
implementation passed to
SshSessionFactory
command
- the remote command to execute.timeout
- a timeout in seconds. The timeout may be exceeded in corner
cases.IOException
CommandFailedException
- if the ssh command execution failed, error message contains
the content of stderr.Copyright © 2019 Eclipse JGit Project. All rights reserved.