Board logo

標題: [介紹] 如何調整 CentOS 7 ssh 登入後 show message [打印本頁]

作者: bruceman    時間: 2017-8-21 16:49     標題: 如何調整 CentOS 7 ssh 登入後 show message

有時後如果想在ssh 登入主機後.呈現自定義的 Message 訊息..你可以這樣做

首先,建立一個 script, make it executable, and save it in /etc/profile.d. Here is an example script named mot.sh:
引用:
#!/bin/bash
#
echo -e "
##################################
#
# Welcome to `hostname`
# This system is running `cat /etc/redhat-release`
# kernel is `uname -r`
#
# You are logged in as `whoami`
#
##################################
"
Next, edit /etc/ssh/sshd_config as follows:

PrintMotd no

This will disable motd. Now restart the sshd service.
# service sshd restart

這樣就可以囉...




歡迎光臨 ADJ網路實驗室 (http://dz.adj.idv.tw/) Powered by Discuz! 6.0.0