ftps

FTPS client behind a proxy server using apache commons net

醉酒当歌 提交于 2019-12-08 07:42:51
问题 Our network team only allow us to connect to our third party client thru proxy server. Is there a way to add a proxy server to FTPS client of apache commons net? If it is not possible, can you tell a way on how to do it. By the way here's the code that is working outside of the company network String server = "ftp.xxxx.com"; String username = "username"; String password = "password"; String remoteFile = "xmlSR.xml"; String localFile = "c:/downloadedfile.xml"; String protocol = "TLS"; // TLS /

Include credentials of shared folder in WinSCP script file

被刻印的时光 ゝ 提交于 2019-12-08 05:50:54
问题 In order to access a remote shared folder, I need to indicate the username and password. However, I have no idea where to put it in my WinSCP code. open ftps://ftpuser:password@hostname/ -explicit -certificate="key" cd Results lcd \\networkname\sharedfolder\folder\ put * This produces an error which is: Error changing directory to '...'. Any idea? Thanks 回答1: The error "Error changing directory" , which you are getting is most probably caused by the lcd command. In Windows, the current

SSL Session reuse in Apache FTPS client in JDK 8u161 [duplicate]

爷,独闯天下 提交于 2019-12-07 16:33:09
问题 This question already has answers here : How to connect to FTPS server with data connection using same TLS session? (3 answers) Closed last year . Using Apache Commons-Net's FTPSClient to connect to a modern FTP/S server does not work. The reason is that they require SSL session reuse, i.e. the SSL session from the control connection needs to be re-used for the data connection. This can usually be deactivated in the server, but that is insecure not always an option (since the server might not

How to configure client authentication with apache.commons.net.ftps?

╄→尐↘猪︶ㄣ 提交于 2019-12-07 08:30:52
问题 I implemented a FTPS client (FTP over SSL/TLS) in java using the apache.commons.net -framework. It is configured to do explicit security on the default port 21. ftpsClient = new FTPSClient(false); ftpsClient.setTrustManager(getConfiguration().getCertificatesManager()); ftpsClient.connect(getConfiguration().getHostName(), getConfiguration().getPort()); As long as I don't enforce client-authentication on the server, everything works fine. But I need to enable client-authentication, so I enforce

ftp_nlist(): data_accept: SSL/TLS handshake failed

跟風遠走 提交于 2019-12-07 08:25:30
Once upon a time, there was a normalish error in PHP land: Warning: ftp_nlist(): data_accept: SSL/TLS handshake failed in [path] on line 29 But here's the catch, "line 29" is not the connection or login, note how it referenced the ftp_nlist() function: $ftp = ftp_ssl_connect($cred['host'], $cred['port'], 180); if (!ftp_login($ftp, $cred['user'], $cred['pass'])) {die("Login Failed");} ftp_pasv($ftp, true); $files = ftp_nlist($ftp, ''); OpenSSL is compiled and enabled in phpinfo() as suggested here: ftp_login() : SSL/TLS handshake failed Other posts I've seen all seem to reference error in the

Include credentials of shared folder in WinSCP script file

你。 提交于 2019-12-07 07:40:25
In order to access a remote shared folder, I need to indicate the username and password. However, I have no idea where to put it in my WinSCP code. open ftps://ftpuser:password@hostname/ -explicit -certificate="key" cd Results lcd \\networkname\sharedfolder\folder\ put * This produces an error which is: Error changing directory to '...'. Any idea? Thanks Martin Prikryl The error "Error changing directory" , which you are getting is most probably caused by the lcd command . In Windows, the current working directory cannot be an UNC path (the \\networkname ). Instead of changing the current

How to create a “FTPS” Mock Server to unit test File Transfer in Java

前提是你 提交于 2019-12-07 07:04:58
问题 I have a CreateFTPConnection class which create a FTPS connection. Using this connection, files are transferred. Here is the code of TransferFile class public class TransferFile { private CreateFTPConnection ftpConnection; private FTPSClient client; public TransferFile(CreateFTPConnection ftpConnection) { this.ftpConnection = ftpConnection; this.client = ftpConnection.getClient(); } public void transfer(Message<?> msg) { InputStream inputStream = null; try { if(!client.isConnected()){

FTPS client behind a proxy server using apache commons net

强颜欢笑 提交于 2019-12-06 21:58:32
Our network team only allow us to connect to our third party client thru proxy server. Is there a way to add a proxy server to FTPS client of apache commons net? If it is not possible, can you tell a way on how to do it. By the way here's the code that is working outside of the company network String server = "ftp.xxxx.com"; String username = "username"; String password = "password"; String remoteFile = "xmlSR.xml"; String localFile = "c:/downloadedfile.xml"; String protocol = "TLS"; // TLS / SSL int timeoutInMillis = 3000; boolean isImpicit = false; FTPSClient client = new FTPSClient(protocol

Connect to uncertified host via FTP over TLS/SSL

情到浓时终转凉″ 提交于 2019-12-06 03:49:48
问题 A vendor I grab a file from is changing from FTP to FTP over SSL. I am trying to update my code from net/ftp to net/ftptls The new host I need to connect to is not certified and my script reports back this error. hostname was not match with the server certificate The vendor will not fix this. Looking at /usr/lib/ruby/1.8/net/ftptls.rb I thought it wouldn't be too hard to monkey-patch FTPTLS to ignore the untrusted host. I tried changing verify_mode to OpenSSL::SSL::VERIFY_NONE and commenting

SSL Session reuse in Apache FTPS client in JDK 8u161 [duplicate]

丶灬走出姿态 提交于 2019-12-06 02:04:52
This question already has an answer here: How to connect to FTPS server with data connection using same TLS session? 3 answers Using Apache Commons-Net's FTPSClient to connect to a modern FTP/S server does not work. The reason is that they require SSL session reuse, i.e. the SSL session from the control connection needs to be re-used for the data connection. This can usually be deactivated in the server, but that is insecure not always an option (since the server might not be under your control) The correct solution would be to make the client actually re-use sessions. There is an open bug for