- macOS
- Enable the Banner option. Edit file /etc/ssh/sshd_config and enabled the Banner option. For that you need to remove the comment character (#) from the line and include a filename after the option. It should be like Banner /etc/ssh/motd.
- Create a banner file. It should be the same file as indicated by the Banner option above.
- Set file permissions
- Restart the SSH service
$ sudo vi /etc/ssh/sshd_config $ sudo vi /etc/ssh/motd $ sudo chmod a=r,u+w /etc/ssh/motd $ sudo sudo launchctl stop com.openssh.sshd $ sudo sudo launchctl start com.openssh.sshd
- Fedora 36 / 37 / 38 / 39
- Enable the Banner option. Edit file /etc/ssh/sshd_config and enabled the Banner option. For that you need to remove the comment character (#) from the line and include a filename after the option. It should be like Banner /etc/ssh/motd.
- Create a banner file. It should be the same file as indicated by the Banner option above.
- Set file permissions
- Restart the SSH service
$ sudo vi /etc/ssh/sshd_config $ sudo vi /etc/ssh/motd $ sudo chmod a=r,u+w /etc/ssh/motd $ sudo systemctl restart sshd
Comments
Post a Comment