You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ftpserver-users@mina.apache.org by Mikael Petterson <mi...@ericsson.com> on 2018/01/18 07:18:10 UTC
Fails to logon to server
Hi,
I am trying to test my FTPS client ( it uses apache commons net). See code below.
I have started a FTP over SSL/TLS server using the code here:
https://mina.apache.org/ftpserver-project/embedding_ftpserver.html
I have no myusers.properties
file as shown in the link above.
I can see that the handshake is performed.
main, READ: TLSv1 Handshake, length = 48
*** Finished
verify_data: { 103, 86, 44, 145, 44, 18, 253, 153, 160, 65, 192, 18 }
***
%% Cached client session: [Session-2, TLS_DHE_DSS_WITH_AES_128_CBC_SHA]
main, WRITE: TLSv1 Application Data, length = 32
pool-4-thread-1, WRITE: TLSv1 Application Data, length = 24
main, READ: TLSv1 Application Data, length = 48
main, WRITE: TLSv1 Application Data, length = 32
main, WRITE: TLSv1 Application Data, length = 32
pool-4-thread-1, WRITE: TLSv1 Application Data, length = 1
pool-4-thread-1, WRITE: TLSv1 Application Data, length = 23
main, READ: TLSv1 Application Data, length = 32
main, READ: TLSv1 Application Data, length = 48
main, WRITE: TLSv1 Application Data, length = 32
main, WRITE: TLSv1 Application Data, length = 48
pool-4-thread-1, WRITE: TLSv1 Application Data, length = 1
pool-4-thread-1, WRITE: TLSv1 Application Data, length = 69
main, READ: TLSv1 Application Data, length = 32
main, READ: TLSv1 Application Data, length = 96
main, WRITE: TLSv1 Application Data, length = 32
main, WRITE: TLSv1 Application Data, length = 32
pool-4-thread-1, WRITE: TLSv1 Application Data, length = 1
pool-4-thread-1, WRITE: TLSv1 Application Data, length = 27
main, READ: TLSv1 Application Data, length = 32
main, READ: TLSv1 Application Data, length = 48
When I get to login() I get a 530 response (530 Login authentication failed).
How is login handled when using explicit TLS/SSL?
Any ideas? Do I need to have a myuser.properties? What should be in it for anonymous account.
Br,
//mike
Client code:
==========
ftps = new FTPSClient();
......
LOG.debug("Trying to create a ftps session");
createKeyManager();
if (keyManager != null) {
LOG.debug("Setting Key Manager");
ftps.setKeyManager(keyManager);
}
try {
ftps.connect(getHost(), getPort());
if(!ftps.isConnected()){
}
setDataChannelProtectionLevel(Protection.PRIVATE);
setProtectionBufferSize(0);
enableEPSVwithIPv4(true);
setMode(Mode.PASSIVE);
boolean login = ftps.login(getUsername(), getPassword());