views:

67

answers:

4

Hello,

when I connected to a FTP-Server with sockets how can I send username and password?

thank you for your answers.

A: 

You might want to have a look at FTPClient's source code.

Gregory Pakosz
+1  A: 

FTP sends username and password in plain text, so you should be able to just invoke the commands and send them that way (at your own risk).


See also

polygenelubricants
+1  A: 

Why not just use Jakarta Commons Net to handle this?

http://commons.apache.org/net/

Thorbjørn Ravn Andersen
A: 

Thank you for your answers...but I want to do this only with sockets. When I connected to the ftp server whats are the next steps to send the username and password?A example would be helpful to understand.

java2010