Question

Disable SSH ability for specific domains?

Posted August 4, 2016 1.9k views
SecurityDNSConfiguration ManagementUbuntu 16.04

Through the DigitalOcean dashboard, you are able to add domains to droplets. Let’s say you add six domains to a droplet, as if you are running multiple domains off of the same server. You are still able to SSH into the server through each domain, seeing as it resolves to the IP address.

Is there a way to disable SSH functionality for specific domains?

Thanks!
Aaron

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Unfortunately this is not possible because there is no way for SSH server to tell which domain you are using. When you use a domain to connect to SSH, DNS will resolve the IP address for the domain and IP address will be used to make the SSH connection.

For security, I would recommend changing the port number of your SSH server or using fail2ban.

Submit an Answer