Use of Figlet

Source: Internet
Author: User

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:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.