I am running an Ubuntu 22.04 server and need to configure sshd_config to achieve the following:
- Allow the use of HostKeyAlgorithms=+ssh-rsa for a specific IP address.
ex. x.x.x.6 , x.x.x.100, x.x.x.150 - Restrict or deny the use of HostKeyAlgorithms=+ssh-rsa for all other IP addresses.
I have tried adding the following lines to my sshd_config file, but it doesn’t seem to work as
<code>Match Address x.x.x.6
HostKeyAlgorithms +ssh-rsa
Match Address x.x.x.100
HostKeyAlgorithms +ssh-rsa
Match Address x.x.x.150
HostKeyAlgorithms +ssh-rsa
</code>
<code>Match Address x.x.x.6
HostKeyAlgorithms +ssh-rsa
Match Address x.x.x.100
HostKeyAlgorithms +ssh-rsa
Match Address x.x.x.150
HostKeyAlgorithms +ssh-rsa
</code>
Match Address x.x.x.6
HostKeyAlgorithms +ssh-rsa
Match Address x.x.x.100
HostKeyAlgorithms +ssh-rsa
Match Address x.x.x.150
HostKeyAlgorithms +ssh-rsa
What is the correct way to configure sshd_config to meet these requirements? Are there any additional steps or configurations I need to consider? Any help or guidance would be greatly appreciated!
Note:
Ubuntu Version: 22.04
OpenSSH Version: OpenSSH_8.9p1