Accesing The Host through Telnet (Port NO:23) Usng Java Code In Linux OS

Hello To All,

I wrote the telnet (Port No :23) Program inorder to the access the Linux Host.

After Giving Login and Password through Code.I am trying to fetch the data from there.I am doing it through the OutputReader and BufferedReader Class and I have written Try and Catch Block also.In My File its giving the Some Garbageg Messages and Hanging there itself .

I tried the Same Program by changing the Port No to 21(ftp) iam able to accessing it.But Former is not getting.Pplz Try to help me out in this problem for Linux Environment.

Thnks in advance

Regards

Rahul (Cheers!!! )

[624 byte] By [BangloreGuya] at [2007-11-27 10:03:47]
# 1
Sorry but my crystal ball is not giving me a clear view of your code. I shall have to get a new one.
sabre150a at 2007-7-13 0:38:46 > top of Java-index,Core,Core APIs...
# 2

Hello !!

I want to access the Linux Machine through the Telnet .I wrote the Program in java for the same. Telnet session was established Succesfully and Socket too working Fine But I am not able to read the data from there and storing that data in some file called ./SCHFOUT.I am priting the BufferReader through

BufferReader br=new InputStream(sock.getInputStream());

System.out.println(","+(char)br.readLine()); //Hanging Here Not

Proceeding to next Step ...

Here the Problem Came ..Here the Program is Hanging !! Not Proceeding to Another Step at all !!!

Hope u got it !!!

Thnks in Advance !!

Regards

Rahul

(Cheerss !!! )

But that File is showing Empty ...(I use OutputReader class BufferReader ,InputStream Class for the Same )

BangloreGuya at 2007-7-13 0:38:46 > top of Java-index,Core,Core APIs...
# 3
I don't see how this even compiles! What do you think System.out.println(","+(char)br.readLine()); //Hanging Here Notdoes?
sabre150a at 2007-7-13 0:38:47 > top of Java-index,Core,Core APIs...