• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

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.
 
You would be much easier to understand if you took that bucket off of your head. And that goes for the tiny ad too!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic