Use Figlet tool to create a cool VPS login welcome interface

888u

Last update at :2024-07-05,Edit by888u

Sometimes when we purchase some merchant VPS servers and log in to SSH, we will see the merchant's customized welcome interface, which looks a bit cool. If we want to customize a more personalized login welcome interface in the VPS and servers we manage and play with, we can use the Figlet tool to set it up, giving us a little fun in the leisurely and boring process.

This is the welcome interface that Snail sees after logging into the current test VPS host. Then let’s take a look at how to set it up in the server.

First, installation of Figlet tool

wget ftp://ftp.figlet.org/pub/figlet/program/unix/figlet-2.2.5.tar.gzcp figlet-2.2.5.tar.gz /usr/local/src/cd /usr /local/src/tar -zxvf figlet-2.2.5.tar.gzcd figlet*make figlet

Because we need to generate the specific characters we need, we need to install Figlet in the current server. There is no installation package by default. In fact, if we only need to install it in one environment, then we only need to copy the characters we need to the required server. , not all need to be installed. Similarly, we can also use the generated characters to use the beginning of the script execution, just use ECHO branch marking.

It needs to be added here that we may not have GCC installed, so when executing make installation, the error "make: gcc: Command not found" will be prompted. Here we need to execute:

yum -y install gcc automake autoconf libtool make

Commonly used component packages.

If there are no errors, you will see the successful installation interface below.

Second, the Figlet tool generates characters

./figlet LAOZUO.ORG -f fonts/standard.flf

Here we need to use Figlet to generate the required characters before they can be used in our boot restore interface. According to the above script, replace it with our own characters. And we can use other fonts.

Font: http://www.figlet.org/fontdb.cgi

Here I used a 3-d.flf font effect. Specifically, we can see the effect based on different fonts. Not much to say about snails here.

Third, add the login welcome interface

1. Copy the characters above

2. vi /etc/ssh/ssh-banner

Add to ssh-banner.

3. Set Banner none

vi /etc/ssh/sshd_config

Find the line #Banner none and add:

Banner /etc/ssh/ssh-banner

Then save and exit.

4. Restart SSH

/etc/init.d/sshd restart

Finally, we exit the current SSH and log in again. You can see the effect of the first picture in this article. Figlet generates characters and then adds the login interface. It is completely my own effort. The login interface looks different from others.

Recommended site searches: foreign servers, US attack-proof servers, overseas server rental prices, overseas server rental prices, foreign domain name applications, Hong Kong server hosting, US hosts, Alibaba Cloud registration, Chongqing servers, European servers,

p>

Use Figlet tool to create a cool VPS login welcome interface

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码