8.8. 使用 SSH 横幅文本
您可以设置一个横幅,以向所有通过 SSH 连接的用户显示控制台消息。您可以使用环境文件中的以下参数向 /etc/issue 添加横幅文本。考虑自定义此示例文本以满足您的要求。
resource_registry:
OS::TripleO::Services::Sshd:
/usr/share/openstack-tripleo-heat-templates/deployment/sshd/sshd-baremetal-puppet.yaml
parameter_defaults:
BannerText: |
******************************************************************
* This system is for the use of authorized users only. Usage of *
* this system may be monitored and recorded by system personnel. *
* Anyone using this system expressly consents to such monitoring *
* and is advised that if such monitoring reveals possible *
* evidence of criminal activity, system personnel may provide *
* the evidence from such monitoring to law enforcement officials.*
******************************************************************
要将此更改应用到部署,请将设置保存为名为 ssh_banner.yaml 的文件,然后将其传递给 overcloud deploy 命令,如下所示:& lt;full environment > 表示您仍然必须包含所有原始部署参数。例如:
openstack overcloud deploy --templates \
-e <full environment> -e ssh_banner.yaml