FTPSClient 使用数字证书或私钥对 FTP 服务器进行身份验证

发布于 2024-08-04 07:16:22 字数 458 浏览 3 评论 0原文

我有一个 Java 应用程序的工作原型,它使用 Apache Commons Net FTPSClient 通过 SSL(端口 990)连接到 FileZilla 服务器。

没问题。问题是,应用程序当前以用户名和密码的形式维护 FTP 用户的凭据。

是否可以通过提供客户端证书/公钥来执行 FTP 用户 的身份验证(如 FTP 登录,而不仅仅是 SSL 协商/验证)?

我知道我可以使用 SCP 或 SFTP 来做到这一点,因为 SSH 服务器可以很好地处理这个问题。如果这是正确的解决方案,那就这样吧,但在我理解之前我不想放弃 FTPS。

所以问题有两个部分:

a) 是否有支持 SSL (FTPS) 和通过证书进行客户端身份验证/登录的 FTP 服务器的实现?

b) 如何让 org.apache.commons.net.ftp.FTPSClient 执行此操作?

I have a working prototype of a Java application that is using Apache Commons Net FTPSClient to connect to a FileZilla server over SSL (port 990 for what it is worth).

No problem. The problem is, the application is currently maintaining the credentials of the FTP user in the form of a username and password.

Is it possible to perform authentication of the FTP user (as in FTP login, not just SSL negotiation/validation) by supplying a client certificate/public key?

I know I can do this with SCP or SFTP because the SSH server handles that just great. If that's the right solution then so be it, but I don't want to give up on FTPS until I understand.

So question has two parts:

a) are there any implementations of FTP servers that support SSL (FTPS) and client authentication/login via certificate?

b) How to get org.apache.commons.net.ftp.FTPSClient to do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

滿滿的愛 2024-08-11 07:16:22

a) 是的,很多服务器都支持通过证书进行客户端身份验证。 Windows 上的 CompleteFTP 是一个,Unix 上的 ProFTPD 是另一个。但需要注意的一件事是,端口 990 通常与隐式模式 FTPS 关联,该模式已被弃用。

b) 不确定 FTPSClient,但在 edtFTPj/PRO 中很容易做到。有关操作方法,请参阅此链接

a) Yes plenty of servers support client authentication via certificate. CompleteFTP on Windows is one, ProFTPD on Unix is another. One thing to note though is that port 990 is normally associated with implicit mode FTPS, which is deprecated.

b) Not sure about FTPSClient, but easy to do in edtFTPj/PRO. See this link for a howto.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文