So here's the problem:
- I have a single server with multiple hostnames, meaning I have A records
*.example.compointing to the server's ip-address
- I want to limit incoming ssh connections to a specific hostname, that is I want to allow only logins to firstname.lastname@example.org, and disallow login attempts using user@ip-address or email@example.com
The man page from sshd_config has the following for
Specifies the local addresses sshd(8) should listen on. The following forms may be used: ListenAddress host|IPv4_addr|IPv6_addr ListenAddress host|IPv4_addr:port ListenAddress [host|IPv6_addr]:port
which seems to indicate that sshd has the ability to restrict itself to a a specific hostname. However I've tried
ListenAddress secret.example.com:22, but after restarting sshd that doesn't seem to add any restrictions based on hostname used.
man sshd_config doesn't seem to show any other options in that vein.
Is there something I'm missing, or does sshd simply not have that ability?