• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

New to socket programming

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic