问题原文
原帖链接 · 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).
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
