1. /etc 경로에 motd파일 작성
2. /etc/sshd/sshd_config 파일 수정
# PrintMotd no
PrintMotd yes
motd파일 생성하는 sh파일
#!/bin/bash
#define the filename to use as output
motd="./motd"
# Collect useful information about your system
# $USER is automatically defined
HOSTNAME=`uname -n`
KERNEL=`uname -r`
CPU=`uname -p`
ARCH=`uname -m`
# The different colours as variables
Black="\033[0;30m"
Red="\033[0;31m"
Green="\033[0;32m"
Blue="\033[0;33m"
Purple="\033[0;34m"
Cyan="\033[0;35m"
Silver="\033[0;36m"
DarkGray="\033[1;30m"
LightBlue="\033[1;34m"
LightGreen="\033[1;32m"
LightCyan="\033[1;36m"
LightRed="\033[1;31m"
Yellow="\033[1;33m"
White="\033[1;37m"
X="\033[0;0m"
clear > $motd # to clear the screen when showing up
echo -e "$Red#=============================================================================#" >> $motd
echo -e " $White Welcome $Blue $USER $White to $Blue $HOSTNAME " >> $motd
echo -e " $Red ARCH $White= $ARCH " >> $motd
echo -e " $Red KERNEL $White= $KERNEL " >> $motd
echo -e " $Red CPU $White= $CPU " >> $motd
echo -e "$Red#=============================================================================#" >> $motd
echo -e "$Yellow
This is a server to treat the personal information.
If you have access to this server with unjustified way, you can receive legal penalty.
Only your activities are allowed within the authority granted to you, and you can receive legal penalty for breaching it.
You here all the activities are being recorded.
In case of any problems, please feel free to contact abc@abc.com.
(Tel. 010-0000-0000)" >> $motd
echo -e "$X" >> $motd
728x90
'Linux > Ubuntu' 카테고리의 다른 글
[Ubuntu] sftp 계정 만들기. (ssh는 접속 불가) (0) | 2021.12.08 |
---|---|
[Ubuntu] apt update Error_1 (0) | 2021.09.28 |
[vim] 내가 애용하는 .vimrc 설정 (0) | 2021.07.30 |
[Ubuntu 18.04] 계정 추가하기. (1) | 2021.07.06 |
[Ubuntu 18.04] 고정 ip 설정하기. (0) | 2021.06.29 |
댓글