Anything the remote sends will be available on the inputStream
associated with the Socket you created.
This login text you are referring to - apparently you have a
particular protocol in mind that you neglected to share with us.
Maybe it requires you to send some kind of handshake before it
sends the login text. Try sending a newline.
No particular protocol, but here is my code where I connection to an
SMTP Server. The server always proves 220 Welcome etc... message as
soon as you connect. This code blocks on the readline(). Obviously I
am not understanding something. Nothing new there

...
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.Socket;
public class RemoteSimpleTester {
public static void main(String[] args) {
try {
Socket socket = new Socket("smtp.mail.yahoo.com",
25);
BufferedReader rd =
new BufferedReader(
new InputStreamReader
(socket.getInputStream()));
String line;
while ((line = rd.readLine()) != null) {
System.out.println(rd.readLine());
}
rd.close();
socket.close();
} catch (Exception e) {
e.printStackTrace();
}
}
}