Package org.pentaho.di.core.ssh
Interface SshConnection
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
MinaSshConnection
SSH connection interface providing secure shell connectivity and operations.
All methods throw specific SSH exceptions instead of generic exceptions for better error handling.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the SSH connection and releases resources.voidconnect()Establishes the SSH connection.Executes a command on the remote SSH server using the configured timeout.Executes a command on the remote SSH server.openSftp()Opens an SFTP session for file operations.
-
Method Details
-
connect
Establishes the SSH connection. -
exec
Executes a command on the remote SSH server.- Parameters:
command- the command to executetimeoutMs- timeout in milliseconds- Returns:
- the execution result
-
exec
Executes a command on the remote SSH server using the configured timeout.- Parameters:
command- the command to execute- Returns:
- the execution result
-
openSftp
Opens an SFTP session for file operations.- Returns:
- the SFTP session
-
close
void close()Closes the SSH connection and releases resources.- Specified by:
closein interfaceAutoCloseable
-