You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Randy Nel Gupta <gu...@scaratec.com> on 2012/09/19 13:08:08 UTC

[NET] "550 SSL/TLS required on the data channel" using FTPSClient

Hi all!

I have a probleme reading data with FTPClient on a FTP-Server (ProFTPD 
1.3.3a) that requires encryption on the data channel. Everything works 
fine without encryption on an other server.

My code is:

FTPSClient ftpsClient = new FTPSClient("TLS", false);
log.debug("using TLS");
FTPClientConfig ftpClientConfig = new 
FTPClientConfig(FTPClientConfig.SYST_UNIX);
ftpClientConfig.setServerLanguageCode("de");
ftpsClient.configure(ftpClientConfig);
ftpsClient.addProtocolCommandListener(new PrintCommandListener(new 
PrintWriter(System.out))); // outputs all conversation to the console
ftpsClient.connect(host, 21);
ftpsClient.login(username, password);
ftpsClient.enterLocalPassiveMode();
ftpsClient.changeWorkingDirectory(pathname);
listNames = ftp.mlistDir();
ftpsClient.logout();

What I get from the output is

220 ProFTPD 1.3.3a Server (xxx) [xxx]
AUTH TLS
234 AUTH TLS successful
USER xxx
331 Password required for xxx
PASS xxx
230 User xxx logged in
CWD /www/catalog
250 CWD command successful
PASV
227 Entering Passive Mode (xxx).
MLSD
550 SSL/TLS required on the data channel
QUIT
221 Goodbye.


Any idea how to configure FTPSClient to use TLS/SSL on the data channel? 
Your help would be appreciated!

Regards Randy

Re: [NET] "550 SSL/TLS required on the data channel" using FTPSClient

Posted by Roman Makurin <dr...@gmail.com>.
On Wed, Sep 19, 2012 at 3:08 PM, Randy Nel Gupta <gu...@scaratec.com> wrote:
> Hi all!
>
> I have a probleme reading data with FTPClient on a FTP-Server (ProFTPD
> 1.3.3a) that requires encryption on the data channel. Everything works fine
> without encryption on an other server.
>
> My code is:
>
> FTPSClient ftpsClient = new FTPSClient("TLS", false);
> log.debug("using TLS");
> FTPClientConfig ftpClientConfig = new
> FTPClientConfig(FTPClientConfig.SYST_UNIX);
> ftpClientConfig.setServerLanguageCode("de");
> ftpsClient.configure(ftpClientConfig);
> ftpsClient.addProtocolCommandListener(new PrintCommandListener(new
> PrintWriter(System.out))); // outputs all conversation to the console
> ftpsClient.connect(host, 21);
> ftpsClient.login(username, password);
> ftpsClient.enterLocalPassiveMode();
> ftpsClient.changeWorkingDirectory(pathname);
> listNames = ftp.mlistDir();
> ftpsClient.logout();
>
> What I get from the output is
>
> 220 ProFTPD 1.3.3a Server (xxx) [xxx]
> AUTH TLS
> 234 AUTH TLS successful
> USER xxx
> 331 Password required for xxx
> PASS xxx
> 230 User xxx logged in
> CWD /www/catalog
> 250 CWD command successful
> PASV
> 227 Entering Passive Mode (xxx).
> MLSD
> 550 SSL/TLS required on the data channel
> QUIT
> 221 Goodbye.
>
>
> Any idea how to configure FTPSClient to use TLS/SSL on the data channel?
> Your help would be appreciated!
>
> Regards Randy

Hi. This should solve ur problem:

ftpsClient.execPROT("P");

-- 
If you think of MS-DOS as mono, and Windows as stereo,
 then Linux is Dolby Digital and all the music is free...

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org