UsePAM=no の場合、ssh ログインに motd は表示されません。

UsePAM=no の場合、ssh ログインに motd は表示されません。

私はそれをカスタマイズし、次のようにログインする/etc/motdと正しく表示されますssh

Welcome to Ubuntu 16.04.6 LTS (GNU/Linux 2.6.32-042stab141.3 x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

 * Ubuntu 20.04 LTS is out, raising the bar on performance, security,
   and optimisation for Intel, AMD, Nvidia, ARM64 and Z15 as well as
   AWS, Azure and Google Cloud.

     https://ubuntu.com/blog/ubuntu-20-04-lts-arrives


<< contents of /etc/motd >>>


Last login: Sun May 17 21:41:54 2020 from 37.30.54.65

その後、設定UsePAMをに変更しましたが、no結果は次のようになります。

Last login: Sun May 17 21:41:54 2020 from 37.30.54.65

ウェルカム画面を維持してUsePAM見続けたいです。no

ベストアンサー1

/etc/motd通常、PAMがシステムに表示されることを担当しているようです。

UsePAM noに設定されている場合は、PAMを使用していない場合でも印刷するようにsshd_config設定する必要があります。PrintMotd yessshd/etc/motd

Ubuntuはこれを使用して、複数のソースから(そしておそらくスクリプトによって生成された他のコンテンツ...または私が正しく覚えている場合は同様のもの)から毎日pam_motd.soメッセージを作成することに注意してください。/etc/motd/etc/motd.d/*update-motd/var/motd.dynamic

sshdMOTDルーチンがより簡単になる可能性があるため、メッセージ全体が/etc/motd

おすすめ記事