- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我一直在尝试将工作的 FTP 连接 FTPClient 更改为 apache 提供的 FTPSClient。所做的唯一更改是更改类并指示应用程序将要连接的端口。服务器连接到同一网络中的另一台服务器。对于外部服务器,需要代理。
我已经尝试将构造函数设置为 true,它显示以下消息:
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);
当我将其设置为 false 时,连接会挂断很长时间。它显示以下消息:
Could not parse response code. Server Reply: SSH-2.0-OpenSSH_4.1
tomcat 显示如下页面:
Proxy Error
The proxy server received an invalid response from an upstream server. The proxy server could not handle the request POST /myapppath/APage.htm.
Reason: Error reading from remote server
final FTPSClient ftp = new FTPSClient( false );
ftp.setDefaultPort(22);
我尝试通过 SFTP 手动连接 WinSCP,连接成功。
最佳答案
FTPS(基于 SSL/TLS 的 FTP)与 SFTP(SSH 文件传输)不同;这是两个完全不同的协议(protocol)。您收到错误 Unrecognized SSL message, plaintext connection?
的原因是您没有连接到 FTPS 服务器。
You can read more about the difference here.如果您想建立 SFTP 连接而不是 FTPS 连接,我建议使用 JSch library .
关于java - FTPSClient 无法连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31485873/
我是 FTPSClient 新手,我尝试连接到在我的笔记本电脑中创建的 FTPS。我不知道一些方法的工作原理及其参数的含义。例如,在我的代码中,我创建了一个 FTPSClient,如下所示: FTPS
我一直在尝试将工作的 FTP 连接 FTPClient 更改为 apache 提供的 FTPSClient。所做的唯一更改是更改类并指示应用程序将要连接的端口。服务器连接到同一网络中的另一台服务器。对
更新... 抱歉实时调试。我整天都被困住了,我想把它写出来让我更深入地研究它…… 我注意到我正在使用 setUseEPSVwithIPv4(true) 发送 EPSV 229 Entering Pas
我需要用 Java 编写代码,使用 FTP over SSL 协议(protocol)连接到服务器列表并从中获取一些文件。每个服务器都有登录名和密码列表。我需要轮流使用每次登录来连接到服务器。像这样的
我有一个 Java 应用程序的工作原型(prototype),它使用 Apache Commons Net FTPSClient 通过 SSL 连接到 FileZilla 服务器(端口 990)。 没
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。 关闭去年。 Im
我们正在尝试使用与我们在标准 FTP 客户端中相同的凭据来访问我们的一个 FTPS 服务器。但是,当使用 Java 类 FTPSClient 时,我们收到错误消息: 530 User cannot l
下面的代码我尝试使用FTPSClient连接SFTP主机。我使用 FTPSClient 进行连接,而不是 FTP 客户端。但我面临连接问题。 public static void main(Strin
我正在使用org.apache.commons.net.ftp.FTPSClient将文件发送到另一台服务器。但程序在之后挂起 boolean stored = client.storeFile(fi
我尝试使用 FTPSClient 连接到 FTP 服务器,虽然身份验证工作正常,但当我尝试发送数据时,出现连接被拒绝错误。 package com.main; import java.io.FileI
我是第一次使用 commons-net 包,并使用下面的代码通过 SSL 从 FileZilla 服务器 ftp 文件。我在运行程序时遇到错误。代码有什么问题? import java.io.File
我需要通过 FTPS(隐式或显式)连接到远程服务器。我通过 FileZilla 成功连接到服务器。我还测试了从公共(public) ftp 检索文件的代码:ftp.mozilla.org现在我需要相同
我设置了 SFTP 连接。我使用了 WinCSP 和 Filezilla,测试服务器工作正常。 Java 代码来自 apache commons-net 2.0,它给了我意外的错误 代码 privat
我正在尝试连接到 FTPS 服务器。我可以很好地连接 FileZilla 并列出服务器中的文件、下载等.. 我正在尝试使用 org.apache.commons.net.ftp 包中的 FTPSCli
已经有一个问题: Secure FTP with org.apache.commons.net.ftp.FTPClient 但是没有给出可接受的答案。 最佳答案 首先,确保您了解 FTPS(安全 FT
我在需要加密数据通道的 FTP 服务器 (ProFTPD 1.3.3a) 上使用 FTPClient 读取数据时遇到问题。在其他服务器上没有加密的情况下一切正常。 我的代码是: FTPSClient
我需要帮助,我正在尝试创建与上传文件的 FTP 服务器的连接。 我正在使用 java jdk1.8.0_45 的以下依赖项。当我运行我的代码时,它会建立连接并登录,但是当我尝试上传文件时,它会抛出异常
我的代码(我在运行时使用-Dhttps.protocols=TLSv1.2 VM 参数): FTPSClient ftpClient = new FTPSClient("TLS", false); f
我是一名优秀的程序员,十分优秀!