diff --git a/src/main/java/net/schmizz/sshj/transport/TransportImpl.java b/src/main/java/net/schmizz/sshj/transport/TransportImpl.java index 8aba4a627..a8c456fb5 100644 --- a/src/main/java/net/schmizz/sshj/transport/TransportImpl.java +++ b/src/main/java/net/schmizz/sshj/transport/TransportImpl.java @@ -196,8 +196,11 @@ private void receiveServerIdent() throws IOException { final Buffer.PlainBuffer buf = new Buffer.PlainBuffer(); while ((serverID = readIdentification(buf)).isEmpty()) { int b = connInfo.in.read(); - if (b == -1) + if (b == -1) { + log.error("Received end of connection, but no identification received. "); throw new TransportException("Server closed connection during identification exchange"); + + } buf.putByte((byte) b); } }