I have multiple network interfaces like Ethernet, Wifi, WWAN etc.
I want to block SSH root
login on all interfaces except for the Ethernet one.
Is there an interface-based configuration for sshd
, like some setting in /etc/ssh/sshd_config
?
I could not find interface-based settings in the settings manual: https://man.openbsd.org/sshd_config
On my WWAN interface, I get attacks from intruders like these, which I want to avoid:
systemd[1]: Condition check resulted in OpenSSH Key Generation being skipped.
systemd[1]: Started OpenSSH Per-Connection Daemon (195.133.18.24:45650).
sshd[704]: Invalid user user from 195.133.18.24 port 45650
sshd[704]: error: Could not get shadow information for NOUSER
sshd[704]: Failed password for invalid user user from 195.133.18.24 port 45650 ssh2
sshd[704]: Received disconnect from 195.133.18.24 port 45650:11: Normal Shutdown, Thank you for playing [preauth]
sshd[704]: Disconnected from invalid user user 195.133.18.24 port 45650 [preauth]
systemd[1]: [email protected]:22-195.133.18.24:45650.service: Succeeded.