execute
SshScriptingService.Result execute(String script,
String user,
String password,
String authKey,
SocketAddress target,
String hostKeyFingerprint,
String shell,
Map<String,String> vars,
java.time.Duration timeout)
Executes the given script and optionally returns a failure.
- Parameters:
script
- contains statements separated by new lines
user
- the ssh user
password
- the ssh user's password
authKey
- the private ssh key
target
- the ssh target to connect to
hostKeyFingerprint
- host key fingerprint to accept from the target system
shell
- optional shell to spawn on connection
vars
- variables that can be referenced in the script; variables are referenced by "${varname}
" expressions
timeout
- used when establishing the ssh interaction and for await statements
- Returns: