diff --git a/src/main/java/net/schmizz/sshj/SocketClient.java b/src/main/java/net/schmizz/sshj/SocketClient.java index dbc6e4ed..0c5f530c 100644 --- a/src/main/java/net/schmizz/sshj/SocketClient.java +++ b/src/main/java/net/schmizz/sshj/SocketClient.java @@ -96,8 +96,8 @@ public void connectVia(Channel channel, String hostname, int port) throws IOExce /** Connect using the supplied InputStream and OutputStream. */ public void connectVia(InputStream input, OutputStream output) throws IOException { - this.hostname = null; - this.port = -1; + this.hostname = "localhost"; + this.port = 65535; this.input = input; this.output = output; this.tunneled = true;