I am getting the below given error while performing ftp from ubuntu machine to same machine. I have done the complete setup and able to transfer file using Filezilla. But while doing the same from code it is giving error. Below I have shown the code snippet.
String PROTOCOL= "SSL"; //I Have tried with TLS also
FTPSClient ftpsClient = new FTPSClient(PROTOCOL, false);
ftpsClient.setTrustManager(TrustManagerUtils.getAcceptAllTrustManager());
ftpsClient.connect("192.168.13.5",21);
ftpsClient.login(userName, password);
I am getting the error 530 Please login with USER and PASS. While connecting only. It is not even going to login statement.
Can somebody please point me out what I am doing wrong here?
I am getting the error 530 Please login with USER and PASS. While connecting only. It is not even going to login statement.
If it is not even going to the login statement the message might be caused by the server rejecting the AUTH TLS
command which is used to upgrade the connection to SSL/TLS. This might indicate that the server does not support TLS at all.
... able to transfer file using Filezilla.
Are you sure that Filezilla did use FTP with TLS and not plain FTP or SFTP (which is file transfer using SSH, something completely different to FTPS)?