Fix localport for openssh >= 8.0 (#618)

Co-authored-by: Moritz Weichert <moritz.weichert@check24.de>
This commit is contained in:
Moritz Weichert
2020-07-09 11:29:47 +02:00
committed by GitHub
parent 7bde5c15c1
commit 588853554a

View File

@@ -20,7 +20,7 @@ import net.schmizz.sshj.connection.Connection;
/** A channel for creating a direct TCP/IP connection from the server to a remote address. */
public class DirectConnection extends DirectTCPIPChannel {
public static final String LOCALHOST = "localhost";
public static final int LOCALPORT = 65536;
public static final int LOCALPORT = 65535;
public DirectConnection(Connection conn, String remoteHost, int remotePort) {
super(conn, new Parameters(LOCALHOST, LOCALPORT, remoteHost, remotePort));