Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

New to socket programming  RSS feed

 
Lokesh Pahadi
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am writing a simple Java Swing application that aims to connect to a Unix server from my windows machine.
When I connect using PUTTY or telnet, I am prompted for a login and then the password.
How can I achieve this from within my Java Swing program, so that I can see the directory listing, download files and upload files from the server.

From the client application I am creating the new Socket(hostname,port) with port = 23. But then how should I pass the login and password so that I can enter the unix server.

I would appreciate any help in this regard.

Thanks in advance!
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless the point is to learn about socket programming, I'd go with a library like Jakarta Commons Net, which implements the Telnet protocol, amongst others.
Emulating Putty is much harder, because it implements SSH, where all kinds of security and encryption features need to be implemented.
 
Lokesh Pahadi
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ulf Dittmer:
Unless the point is to learn about socket programming, I'd go with a library like Jakarta Commons Net, which implements the Telnet protocol, amongst others.
Emulating Putty is much harder, because it implements SSH, where all kinds of security and encryption features need to be implemented.


Thanx buddy. Now I can take from here.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!