How do you set a login banner and why?
BeginnerProductionSSH & Access Hardening
Answer
Legal/compliance teams want an authorized-use warning before login.
# sshd_config
Banner /etc/issue.net
Put the text in /etc/issue.net (pre-login over SSH), /etc/issue (console) and /etc/motd (post-login). Never reveal OS or kernel versions in banners; CIS checks that \v, \r, \m, \s escapes are absent.
More on SSH & Access Hardening
What are the first sshd_config changes you make on a new production server?BeginnerWhy use a drop-in file in /etc/ssh/sshd_config.d/ instead of editing sshd_config?IntermediateWhy disable SSH password authentication entirely?BeginnerShould you change the SSH port from 22?IntermediateWhat are SSH certificates and why do large fleets use them?AdvancedHow do you restrict what a specific SSH key can do?Advanced