查看完整版本: 如何調整 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:

[quote]
#!/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`
#
##################################
"
[/quote]

Next, edit /etc/ssh/sshd_config as follows:

PrintMotd no

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

這樣就可以囉...
頁: [1]
查看完整版本: 如何調整 CentOS 7 ssh 登入後 show message