I've installed FileZilla Pro Server on a VPS server, and have it working with SFTP.
At first, I just used the IP address to access the server, but I've since added an ftp.domain.com
subdomain to my VPS. This is also working fine.
However, if instead of ftp.domain.com
, I use any other domain or subdomain hosted on my server, that also works!
Is there any way to restrict SFTP access to only use ftp.domain.com
? And to reject all other domains and subdomains?
Note: There is one IP address for the entire VPS server and adding additional IP addresses isn't an option in the immediate future.
SSH / SFTP does not have concept of virtual hosts in the way http / https protocols have.
Therefore the answer is no. You need to have a separate IP address to limit access.