java - FTPSClient failing to connect -


i have been trying change working ftp connection ftpclient ftpsclient provided apache. changes made changing class , indicating port application going connect. server connects server within same network. external servers, proxy required.

i tried setting constructor true, shows following message:

unrecognized ssl message, plaintext connection?

final ftpsclient ftp = new ftpsclient( true ); //same results //final ftpsclient ftp = new ftpsclient("ssl", true ); //final ftpsclient ftp = new ftpsclient("tls", true ); ftp.setdefaultport(22); 

when set false, connection hangs lot of time. shows following message:

could not parse response code. server reply: ssh-2.0-openssh_4.1

and tomcat shows following page:

proxy error

the proxy server received invalid response upstream server. proxy server not handle request post /myapppath/apage.htm.

reason: error reading remote server

final ftpsclient ftp = new ftpsclient( false ); ftp.setdefaultport(22); 

i tried connecting manually winscp via sftp , connection successful.

ftps (ftp on ssl/tls) not same sftp (ssh file transfer); these 2 different protocols. reason getting error unrecognized ssl message, plaintext connection? because not connecting ftps server.

you can read more difference here. if want make sftp connection rather ftps connection, recommend using jsch library.


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -