OPNsense Forum

English Forums => General Discussion => Topic started by: gege29 on September 27, 2024, 10:50:06 AM

Title: SSHD Match directive, best approach?
Post by: gege29 on September 27, 2024, 10:50:06 AM
Hello,

I would like to make the sshd config file to contain a match directive, I could just go straight to the .conf file generated by /usr/local/etc/inc/plugins.inc.d/openssh.inc but I believe this wouldn't survive a reboot/upgrade.

What would be best practice approach you would suggest me to follow? I envision 2 solutions, perhaps here I can find some other approach that suits best.

1/ Make the /usr/local/etc/ssh/sshd_config immutable and add the Match directive.

2/ Write a simple script in /usr/local/etc/rc.d/ to append the Match directive to the sshd_conf?

Thanks in advance!