大网数据广告活动
服务器运维问答

FTP over TLS, with multiple sites hosted on the same server

· 52CE 我爱测

Is it possible to have FTP over TLS on a server that hosts multiple websites (domains) ? I can get certificates for any of the domains, but the problem is that I have no way of knowing to which domain does a user connect to from …

问题原文

原帖链接 · onetrickpony · CC BY-SA 4.0

Is it possible to have FTP over TLS on a server that hosts multiple websites (domains) ?

I can get certificates for any of the domains, but the problem is that I have no way of knowing to which domain does a user connect to from his client. Therefor I don't know which certificate to send to the FTP client. I know that after he sends the user and password, but not before, so I can't set up the secure connection during the FTP server start phase.

Is there any way around this?

已采纳解答

原帖链接 · Steffen Ullrich · CC BY-SA 4.0

There is no concept of a hostname in FTP itself. In theory a client might send the expected hostname inside the TLS handshake as server_name extension (SNI) in the ClientHello. This way the server might decide which certificate to send. But while this is common for HTTP I doubt that all FTP server and clients support it. A cursory search reveals that recent versions of ProFTPd server and FileZilla client should support it though.

Of course you could also provide a FTP server on a fixed hostname and then have domain specific home directories and credentials. This way it would work with any server or client and even without TLS (not recommended).

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-09-23)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。