Use of Figlet
Unix has a very interesting tool called banner. The input characters can achieve the following effects:
The Red Hat-based release version does not have this command. Instead, we can use the figlet tool. After downloading it, copy it to the/usr/local/src directory and then perform the following actions:
[Root @ DB2 ~] # Wget ftp://ftp.figlet.org/pub/figlet/program/unix/figlet-2.2.5.tar.gz
[Root @ DB2 ~] # Cp figlet-2.2.5.tar.gz/usr/local/src/
[Root @ DB2 ~] # Cd/usr/local/src/
[Root @ DB2 src] # tar zxf figlet-2.2.5.tar.gz
[Root @ DB2 src] # cd figlet-2.2.5
[Root @ DB2 figlet-2.2.5] # make figlet
[Root @ DB2 figlet-2.2.5] #./figlet WELCOME-f fonts/standard. flf
__________________________
\\//____ |/___/_ \ | \/ | ____ |
\/\ // | _ | \/| _ |
\ V/| ___ | |__ | _ |||||||| ___
\_/ | _____ \____ \___/| _ | _____ |
But what is the practical use of this? There may be a lot of linux Hosts managed by everyone. If you are worried about logging on to the wrong host during ssh access, you can use this title to prompt when you enter the host. The effect is good.
The procedure is as follows:
1. Generate the characters and copy the following:
[Root @ DB2 figlet-2.2.5] #./figlet welcome to DB2-f fonts/standard. flf
______________________________________________
\/____ |/___/_ \ | \/| ____ | _/_ \ | __)___\
|||||||||||||||\// |||||||||||||||||\_ _) |
\ V/| ___ | |__ | _ |||||||___ |||||||||||| _) /__/
\_/ | _____ \____ \___/| _ | _____ | |_|\___/|____/_____ |
2. paste the above large characters and save them. (You can directly paste them to/etc/issue without creating a new one)
[Root @ DB2 figlet-2.2.5] # cat <EOF>/etc/ssh-banner
> ______________________________________________
> \/____ |/___/_ \ | \/| ____ | _/_ \ | __)___\
> \/| _ | \/| _\__) |
> \ V/| ___ | |__ | _ |||||||___ ||||||||||||| _) /__/
> \_/ | _____ \____ \___/| _ | _____ | |_|\___/|____/_____ |
> EOF
3. vim/etc/ssh/sshd_config, change the line # Banner none to the following:
[Root @ DB2 figlet-2.2.5] # grep-n 'no default banner path'/etc/ssh/sshd_config
128: # no default banner path
[Root @ DB2 figlet-2.2.5] # vim + 128/etc/ssh/sshd_config
# No default banner path
Banner/etc/ssh-banner
# Banner none
(Or/etc/issue)
[Root @ DB2 figlet-2.2.5] #/etc/init. d/sshd restart
Stopping sshd: [OK]
Starting sshd: [OK]
4. Restart session logon. The effect is as follows:
This article permanently updates the link address: