java.lang.Object
org.miaixz.bus.extra.ssh.SshjKit
Utility class for SSHJ, a Java library for SSH. This class provides a simplified way to create and configure an
SSHClient. Project homepage:
https://github.com/hierynomus/sshj- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.schmizz.sshj.SSHClientopenClient(Connector connector) Opens and authenticates an SSH client connection using the provided connection details.
-
Constructor Details
-
SshjKit
public SshjKit()
-
-
Method Details
-
openClient
Opens and authenticates an SSH client connection using the provided connection details. This method configures the client with a promiscuous host key verifier, sets timeouts, connects to the server, and authenticates using a password.- Parameters:
connector- TheConnectorobject containing connection information (host, port, user, password, timeout).- Returns:
- An initialized and authenticated
SSHClientinstance. - Throws:
org.miaixz.bus.core.lang.exception.InternalException- if anIOExceptionoccurs during connection or authentication.
-