sshd_config ipv4 only
- User
sshd_config ipv4 only
- Assistant
If you want to configure the
sshd(OpenSSH server daemon) to listen only on IPv4 addresses, you can do so by modifying thesshd_configfile. Here’s how you can do that:-
Open the
sshd_configfile: You’ll typically find this file located at/etc/ssh/sshd_config. You can edit it using a text editor such asnanoorvi. For example, you can use:bashsudo nano /etc/ssh/sshd_config -
Add or modify the
AddressFamilydirective: To restrict to IPv4 only, you will need to set the option to . Look for the line with and modify it (or add it if it does not exist) to:
-
- User
and set specified ip for sshd
- Assistant