I'm using the following code:
val ftpClient = FTPSClient()
ftpClient.connect(host, port)
And getting the following error:
org.apache.commons.net.MalformedServerReplyException: Could not parse response code.
Server Reply: SSH-2.0-BIS FileExchange Gateway 2.70.1
It's as if the client is not even speaking SSL when it connects but I'm stumped.
Attempt to "coerce" SSL sockets produce no difference:
val sslContext = SSLContext.getInstance("SSL").apply {
init(null, arrayOf<TrustManager>(TrustManagerUtils.getAcceptAllTrustManager()), null)
}
val ftpClient = FTPSClient(sslContext)
ftpClient.connect(host, port)
Setting the socket factory produced a socket closed exception:
ftpClient.setSocketFactory(sslContext.socketFactory)
I should note that I can operate the endpoint using sftp so I can infer that the endpoint works correctly.