ADJ網路實驗室
打印

[介紹] 如何調整 CentOS 7 ssh 登入後 show message

如何調整 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

這樣就可以囉...





TOP

ARTERY.cn