日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

linux 修改ssh banner

發布時間:2024/9/19 51 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux 修改ssh banner 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

前言

  • CentOS Linux release 8.5.2111
  • CentOS Linux release 7.6.1810 (Core)

方法1:修改ssh banner

  • 添加banner文件
  • shell> vim /etc/ssh/ssh_banner welcome to server test-01
  • 修改sshd_config文件,引用banner文件
  • shell> vim /etc/ssh/sshd_config # no default banner path Banner /etc/ssh/ssh_banner
  • 重啟sshd
  • shell> systemctl restart sshd

    方法2:修改/etc/motd

    /etc/motd即message of today(布告欄信息)。每次用戶登錄時,/etc/motd文件的內容會顯示在用戶的終端。
    /etc/motd缺點:用戶登錄系統如果是圖形界面,這些信息就不會顯示。

    shell> vim /etc/motd welcome to server test-01

    方法3:在/etc/motd.d目錄下添加文件

    shell> echo "welcome to server test-01" >> /etc/motd.d/hello

    檢查配置是否生效

    重開ssh

    參考

    https://blog.csdn.net/yainyiyi123/article/details/24027969
    https://blog.csdn.net/dream_dt/article/details/79531085

    總結

    以上是生活随笔為你收集整理的linux 修改ssh banner的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。